Message ID | 20200608230654.828134-17-guro@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=PqO3=7V=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F065138C for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 8 Jun 2020 23:07:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B8F520812 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 8 Jun 2020 23:07:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="NocHiOsj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B8F520812 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=fb.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 291B26B002C; Mon, 8 Jun 2020 19:07:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 243426B002B; Mon, 8 Jun 2020 19:07:53 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BD606B002E; Mon, 8 Jun 2020 19:07:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id DE62C6B002B for <linux-mm@kvack.org>; Mon, 8 Jun 2020 19:07:52 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A77E4181ABEA7 for <linux-mm@kvack.org>; Mon, 8 Jun 2020 23:07:52 +0000 (UTC) X-FDA: 76907583984.10.game84_2109d0f26dbd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 8C2D4CBE0 for <linux-mm@kvack.org>; Mon, 8 Jun 2020 23:07:52 +0000 (UTC) X-Spam-Summary: 2,0,0,1fa3443e89de74c0,d41d8cd98f00b204,prvs=3428c3563a=guro@fb.com,,RULES_HIT:41:355:379:541:800:960:968:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1437:1513:1515:1516:1518:1521:1534:1539:1711:1714:1730:1747:1777:1792:2198:2199:2393:2538:2559:2562:3138:3139:3140:3141:3142:3350:3865:3868:3871:4321:5007:6261:6653:9592:10004:10400:11026:11658:11914:12043:12114:12296:12297:12438:12555:12895:12986:13069:13255:13311:13357:14096:14097:14181:14394:14721:21080:21451:21627:21990:30054:30064:30070:30075,0,RBL:67.231.153.30:@fb.com:.lbl8.mailshell.net-62.12.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: game84_2109d0f26dbd X-Filterd-Recvd-Size: 3761 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by imf45.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Mon, 8 Jun 2020 23:07:51 +0000 (UTC) Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.42/8.16.0.42) with SMTP id 058N7orL012063 for <linux-mm@kvack.org>; Mon, 8 Jun 2020 16:07:51 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=zcj5cOhikHZGYmyFMPbMGzx/9MYXkskZJ2rJF+Ro4jw=; b=NocHiOsjw9jTPBS/c+d55kE77oTboZehrmtF4vNJ63lmc6Cc2pqOhsY6kGEc8jwcuTNm yXw+P1E+aaj0DU+iKy1LAIv6zug/9Z+ahumLCxsKMrYfInvwaedL2hY9VIXwSCxm4Vet 5j+fd25Y4kTk2rAmzLF1Bvth8cbfK+/CYNg= Received: from mail.thefacebook.com ([163.114.132.120]) by m0001303.ppops.net with ESMTP id 31g6tkjf3u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for <linux-mm@kvack.org>; Mon, 08 Jun 2020 16:07:51 -0700 Received: from intmgw003.06.prn3.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c085:21d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 8 Jun 2020 16:07:08 -0700 Received: by devvm1291.vll0.facebook.com (Postfix, from userid 111017) id 74E821D8FE5A; Mon, 8 Jun 2020 16:07:00 -0700 (PDT) Smtp-Origin-Hostprefix: devvm From: Roman Gushchin <guro@fb.com> Smtp-Origin-Hostname: devvm1291.vll0.facebook.com To: Andrew Morton <akpm@linux-foundation.org>, Christoph Lameter <cl@linux.com> CC: Johannes Weiner <hannes@cmpxchg.org>, Michal Hocko <mhocko@kernel.org>, Shakeel Butt <shakeelb@google.com>, <linux-mm@kvack.org>, Vlastimil Babka <vbabka@suse.cz>, <kernel-team@fb.com>, <linux-kernel@vger.kernel.org>, Roman Gushchin <guro@fb.com> Smtp-Origin-Cluster: vll0c01 Subject: [PATCH v6 16/19] mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo() Date: Mon, 8 Jun 2020 16:06:51 -0700 Message-ID: <20200608230654.828134-17-guro@fb.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200608230654.828134-1-guro@fb.com> References: <20200608230654.828134-1-guro@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-08_18:2020-06-08,2020-06-08 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 malwarescore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxlogscore=777 impostorscore=0 bulkscore=0 clxscore=1015 cotscore=-2147483648 adultscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006080161 X-FB-Internal: deliver X-Rspamd-Queue-Id: 8C2D4CBE0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
The new cgroup slab memory controller
|
expand
|
On Mon, Jun 8, 2020 at 4:07 PM Roman Gushchin <guro@fb.com> wrote: > > memcg_accumulate_slabinfo() is never called with a non-root > kmem_cache as a first argument, so the is_root_cache(s) check > is redundant and can be removed without any functional change. > > Signed-off-by: Roman Gushchin <guro@fb.com> > Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Shakeel Butt <shakeelb@google.com>
diff --git a/mm/slab_common.c b/mm/slab_common.c index c045afb9724e..52164ad0f197 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1087,9 +1087,6 @@ memcg_accumulate_slabinfo(struct kmem_cache *s, struct slabinfo *info) struct kmem_cache *c; struct slabinfo sinfo; - if (!is_root_cache(s)) - return; - c = memcg_cache(s); if (c) { memset(&sinfo, 0, sizeof(sinfo));