Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5469467imm; Wed, 12 Sep 2018 06:31:00 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbg4z8N57swdYFdRTohGyFesUTEEqBf+xLSu3aZTVv+2L28qfI+qCUUGks7K4stgkNcBLWb X-Received: by 2002:a17:902:304:: with SMTP id 4-v6mr2320693pld.39.1536759060026; Wed, 12 Sep 2018 06:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536759060; cv=none; d=google.com; s=arc-20160816; b=wkNdVu3xfynFVPeaLRaWUAXdsGjt9Y2DCAys24Gp+lgPGwVOPlmIqUP0b+MqBejSrB FIJ3Q6bp/XZw7GX65pax+IrUkRVsIEvr18iFUUt8SW91UQxnrc9wgDvpG1nQDXH8FHbK 9CooL7Lpa1HZMpIEcGZlniCfK9tB+N8T3wYzEUST0NfULtLIw9h2CyIFeDUlqbxquE9S LM7o6TdflM6ithQBi4NnFX4jROEUti9waFoy9tIEVexkT2BiYOaBXSjir0wjHpjbC1lJ 5HlrU4qc7TbExcC6je+lBWvQiIuXpuwd6EF9dcx6bh9NlnYro8ZnRhsn/cUg0aySxSwJ xq4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=NMVqQB9SiIeRZTH2H/BUYZ35VOohkeIZGngJMh06Exc=; b=Xj0U1wX/aWpzbDgXNeJplJQCJwsql4cs8FNGmUtIo2jDflAAOEqKFriizLPJmYpvzy QrqFHWiWh/HctlsA/T3CoUHWK/gqGRE7hPOtIyhRmGNdlfOyuCYcxbinPYIpjbRM/met eMdRT73sj/m5Z5/0oQk6bq367CFebYJsRxLsUXw6pqWD+cfpExKMW3Rfimue4kYT4UcM 3R80hFHaCTrXpQ0qDtGUn8sz3LVol/KXZ2/BnPgUyDcZpvigkzyGG/yjkzKABHuVXEWk IsGGw/Eliz8JcQzBP2HDhv++8Wz6vt9jY29fpCtjPpG/dBViUSNgqdqwuXzt7b67rVRL yUNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=vih8bRpW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12-v6si1091350pgh.264.2018.09.12.06.30.44; Wed, 12 Sep 2018 06:30:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=vih8bRpW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727403AbeILSfI (ORCPT + 99 others); Wed, 12 Sep 2018 14:35:08 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:37896 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726754AbeILSfH (ORCPT ); Wed, 12 Sep 2018 14:35:07 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8CDT9Pq041219; Wed, 12 Sep 2018 13:29:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=NMVqQB9SiIeRZTH2H/BUYZ35VOohkeIZGngJMh06Exc=; b=vih8bRpWLpgDKKX1qtMNYHMoMNlZZUJ6i+bE0+XCYhGttTyOqyV2Hf8tk1NcgrTtz84f zRaSoKLVUgHVj3+NUBBeUjYSN4AXQb6U6LlyhUssLHX/moRSb+z8K1TLBrX4YQc4FyyR KtYTQkF2qQZzFmc0zT0gat8V8h+PnbsrDw6jZcl6/s9trgqX7EoI4i8NlrXoQrgwmY9g sM/xYj4s9xGZsXszDYAUkIbCGN6l6r3amd8CxKwzUIe3gq/4HUs3VYA7iYqS7JiO+Yju mPRXpQE3xbEF1xauoG1rrikQEpaIGvf/cfQMBonclGDt8yk6PHmet16nZrTvjZ3EDQMx 0w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2mc5utj52w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 13:29:57 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8CDTuV2030419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Sep 2018 13:29:56 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8CDTrpv014011; Wed, 12 Sep 2018 13:29:53 GMT Received: from [10.152.34.32] (/10.152.34.32) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Sep 2018 06:29:52 -0700 Subject: Re: [RFC PATCH v2 1/8] mm, memcontrol.c: make memcg lru stats thread-safe without lru_lock To: Laurent Dufour , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Cc: aaron.lu@intel.com, ak@linux.intel.com, akpm@linux-foundation.org, dave.dice@oracle.com, dave.hansen@linux.intel.com, hannes@cmpxchg.org, levyossi@icloud.com, mgorman@techsingularity.net, mhocko@kernel.org, Pavel.Tatashin@microsoft.com, steven.sistare@oracle.com, tim.c.chen@intel.com, vdavydov.dev@gmail.com, ying.huang@intel.com, daniel.m.jordan@oracle.com References: <20180911004240.4758-1-daniel.m.jordan@oracle.com> <20180911004240.4758-2-daniel.m.jordan@oracle.com> From: Daniel Jordan Message-ID: Date: Wed, 12 Sep 2018 09:28:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9013 signatures=668708 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120140 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/11/18 12:32 PM, Laurent Dufour wrote: > On 11/09/2018 02:42, Daniel Jordan wrote: >> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h >> index d99b71bc2c66..6377dc76dc41 100644 >> --- a/include/linux/memcontrol.h >> +++ b/include/linux/memcontrol.h >> @@ -99,7 +99,8 @@ struct mem_cgroup_reclaim_iter { >> }; >> >> struct lruvec_stat { >> - long count[NR_VM_NODE_STAT_ITEMS]; >> + long node[NR_VM_NODE_STAT_ITEMS]; >> + long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS]; > > It might be better to use different name for the lru_zone_size field to > distinguish it from the one in the mem_cgroup_per_node structure. Yes, not very grep-friendly. I'll change it to this: struct lruvec_stat { long node_stat_cpu[NR_VM_NODE_STAT_ITEMS]; long lru_zone_size_cpu[MAX_NR_ZONES][NR_LRU_LISTS]; }; So the fields are named like the corresponding fields in the mem_cgroup_per_node structure, plus _cpu. And I'm certainly open to other ideas.