From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5908C2BB84 for ; Thu, 3 Sep 2020 05:35:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0EEE02071B for ; Thu, 3 Sep 2020 05:35:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EEE02071B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5C90C6B0002; Thu, 3 Sep 2020 01:35:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 550886B0003; Thu, 3 Sep 2020 01:35:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 419CA6B0037; Thu, 3 Sep 2020 01:35:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id 266BD6B0002 for ; Thu, 3 Sep 2020 01:35:56 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D39D28248068 for ; Thu, 3 Sep 2020 05:35:55 +0000 (UTC) X-FDA: 77220638670.10.death73_0206465270a7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id A85FE16A069 for ; Thu, 3 Sep 2020 05:35:55 +0000 (UTC) X-HE-Tag: death73_0206465270a7 X-Filterd-Recvd-Size: 3162 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Sep 2020 05:35:54 +0000 (UTC) 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 X-Rspamd-Queue-Id: A85FE16A069 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 Content-Transfer-Encoding: quoted-printable 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: =E5=9C=A8 2020/8/31 =E4=B8=8A=E5=8D=884:32, Alexander Duyck =E5=86=99=E9=81= =93: >> Right that the different level to fix this problem, but narrow the cmp= xchg >> 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 s= till 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