Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp283844pxk; Wed, 2 Sep 2020 22:37:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdYgJGWoVo6klvouQc94EO68zlvt1N4GbzX9pmYniQpuVgfinxjCYnxTM7onlYf/ZWO2o8 X-Received: by 2002:a17:906:38c7:: with SMTP id r7mr481679ejd.118.1599111462187; Wed, 02 Sep 2020 22:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599111462; cv=none; d=google.com; s=arc-20160816; b=nQzPo7cn8Uhe/Rr917KpvzOLm53DEzicv5oDHByKqgzAhMaHL6e3fHQmWiMJeCCAAY 0V4PjjTXG68v5thsZUqVZNHkXcnUuZzyEL6pbAxH4ZB0bMKfKj8u4VACRo9gOz/QPM1J qiWDfAByv2O+Tov49bZRLYvSt3a0aPVRmBL0DQP8emeNJRrVnu0KOSSmAlslwqyt8dLh folo9bTyj5G+b0tV6GcFCOeQbhF/pujULoV/M+0p+3WzZeLJquyYXeVoyNtCydzF6DVN /f4Gfol2ZRdSqYyEP72YQlDsQqtCt7TkRVGT0VX6ZSPuuoSkNKE3NCSFLn6DgAOeEVcM +XHA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=A3hY1y18n0hXKoG3MtSARZELOG5Szq1qXVRLAFug7CE=; b=blX4TbQqTwPG8Qz/+l0LuDqSkbbqzJw2NaWcbeH4fGWQc/c6osM4eiVX+3zJrZ56KX G9uIJx7ZI5UUhPFqLl7N6wzFh1OJrs3QLfBRaK5f0k0aCMwcmdokhh0neTRF+1D7Ftqd pY9S2a/Wj1yKSERyrau7KfnM7PL0jVAebZ1YMBvBPf9SScBKS/M+3HA6QCUxulOurH/J 4rgvlU86QP9S+4n7M8IYAWGwl2KGfxFhLR1cKnN9Vy1gTQrarQYyBTHgtA+N3MR//FJ0 IIIKYDqt3mxX84RwtmPAnaOsM12jaraiOs9DGOlgLrTB81UYQ22jYUCmdvTgPSed28+7 wBxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n26si1163792eji.66.2020.09.02.22.37.19; Wed, 02 Sep 2020 22:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbgICFfv (ORCPT + 99 others); Thu, 3 Sep 2020 01:35:51 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:34292 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbgICFft (ORCPT ); Thu, 3 Sep 2020 01:35:49 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R531e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04455;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0U7nAZp3_1599111342; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U7nAZp3_1599111342) by smtp.aliyun-inc.com(127.0.0.1); Thu, 03 Sep 2020 13:35:43 +0800 Subject: Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags To: Alexander Duyck Cc: Anshuman Khandual , Matthew Wilcox , David Hildenbrand , Andrew Morton , Hugh Dickins , Alexander Duyck , LKML , linux-mm , Vlastimil Babka References: <1597816075-61091-1-git-send-email-alex.shi@linux.alibaba.com> <1597816075-61091-2-git-send-email-alex.shi@linux.alibaba.com> <715f1588-9cd5-b845-51a5-ca58549c4d28@arm.com> From: Alex Shi Message-ID: <8a7a698b-1d36-897d-7ef0-75ec022663c1@linux.alibaba.com> Date: Thu, 3 Sep 2020 13:35:34 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/8/31 上午4:32, Alexander Duyck 写道: >> Right that the different level to fix this problem, but narrow the cmpxchg >> comparsion is still needed and helpful. > What I was getting at though is that I am not sure that is the case. > Normally I believe we are always holding the zone lock when updating > the migrate type. The skip flag is a one-off operation that could > easily be addressed by changing the logic to use atomic_and or > atomic_or for the cases where we are updating single bit flags and > setting the mask value to all 1's or all 0's. So adding this extra > complexity which only really applies to the skip bit may not provide > much value, especially as there are a number of possible paths that > don't use the skip bit anyway. Using atomic bit set is only helpful for skip bit. but migrate bits are still do the false sharing sync large. And actully, for this issue on cmpxchg, it's cross arch issue which it's better addressed in kernel. I see much of cmpxchg is using in kernel, but no one mentioned the shortage on this. On this pointer, this problem should be resovled in kernel. Thanks Alex