Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp295033pxa; Wed, 19 Aug 2020 01:12:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhtKbBrsCTQgEvLreQR3In1WYCu80Kh2minha2Zx6PUpwI4qOPLyIg8rdse1PsaON/1a3A X-Received: by 2002:a50:d791:: with SMTP id w17mr22624007edi.373.1597824744944; Wed, 19 Aug 2020 01:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597824744; cv=none; d=google.com; s=arc-20160816; b=sWlbeV+L3h235DYbHPXqJ+BKGLtNUFGaomYGypbx6A94vQb0eYjfKFXnL4qAVxUkwW huceQINKAO7j3tjf2G4/jGE4bY/Ns4vMibGkIhG/VCGSGuvax0UP8emUQpYI5nDlDBp/ ZVnTUIBdS2p0CJyjaADrq15vMvs5i9NnoeduUo8vrZfMjWJJJymaKtB+dbH4yKInz3d6 2rTFKSHKNw5+4pELyjMQiXqSIIPNVjU2CghVKrHPmegpsnneOk0kuNCmzLIekW6aXwvJ ADFApL4fdeKJUv1TmR4g/cFDSvuW81yrE7Llnf9UsvSkerBk0KkY4z8gXUtAT79k/d8S c12w== 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=ipPJEpOVLLAvjaeFigM2jQJT4DhU77vu32sTulMm4hI=; b=BIbE14IOeOAUQD8d0Cf5rF1cnMf5PJAmstj+Meaw/sAm5jSeQAoR3a8YT9Oy0cVr5t 981l7V7qYSUoTzlXb864frbJG1R+TKgbtFKi1GFgmo/pfFqZWx3mZc2amPInSAy9FBBZ 09uZslZDQY/owD9qFs8AIRLea243cUm1bmuA21AKWXd9TfWp6/2+5C8pWyRZ25ELqKGI japeEgY0Zo8nj3QUQpppzC2a5oN1o++fy+STQ+seobCUNMbxPg8FEpVEsDYlCU6IgT0t benMZfqA2EFYvEGAdW5abZTfC37+pmYBg44YPzE0Un6/trL+IW/PF21rJBl35dCdGobO p23g== 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 ot41si5268723ejb.173.2020.08.19.01.12.00; Wed, 19 Aug 2020 01:12:24 -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 S1726745AbgHSILQ (ORCPT + 99 others); Wed, 19 Aug 2020 04:11:16 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:37318 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgHSILJ (ORCPT ); Wed, 19 Aug 2020 04:11:09 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R571e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01358;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0U6D2.Qz_1597824663; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U6D2.Qz_1597824663) by smtp.aliyun-inc.com(127.0.0.1); Wed, 19 Aug 2020 16:11:04 +0800 Subject: Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags To: Anshuman Khandual , Matthew Wilcox , David Hildenbrand Cc: Andrew Morton , Hugh Dickins , Alexander Duyck , linux-kernel@vger.kernel.org, linux-mm@kvack.org 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: Date: Wed, 19 Aug 2020 16:09:51 +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: <715f1588-9cd5-b845-51a5-ca58549c4d28@arm.com> 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/19 下午3:57, Anshuman Khandual 写道: > > > On 08/19/2020 11:17 AM, Alex Shi wrote: >> Current pageblock_flags is only 4 bits, so it has to share a char size >> in cmpxchg when get set, the false sharing cause perf drop. >> >> If we incrase the bits up to 8, false sharing would gone in cmpxchg. and >> the only cost is half char per pageblock, which is half char per 128MB >> on x86, 4 chars in 1 GB. > > Agreed that increase in memory utilization is negligible here but does > this really improve performance ? > It's no doubt in theory. and it would had a bad impact according to commit e380bebe4771548 mm, compaction: keep migration source private to a single but I do have some problem in running thpscale/mmtest. I'd like to see if anyone could give a try. BTW, I naturally hate the false sharing even it's in theory. Anyone who doesn't? :) Thanks Alex