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,URIBL_BLOCKED,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 D1A66C433E2 for ; Thu, 3 Sep 2020 09:00:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5DE04206E7 for ; Thu, 3 Sep 2020 09:00:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DE04206E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EC6C26B0055; Thu, 3 Sep 2020 05:00:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E774B6B006C; Thu, 3 Sep 2020 05:00:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3F2F6B006E; Thu, 3 Sep 2020 05:00:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0068.hostedemail.com [216.40.44.68]) by kanga.kvack.org (Postfix) with ESMTP id C02556B0055 for ; Thu, 3 Sep 2020 05:00:28 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7E3C1180AD806 for ; Thu, 3 Sep 2020 09:00:28 +0000 (UTC) X-FDA: 77221154136.04.veil36_0615283270a8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 4AB94800E10D for ; Thu, 3 Sep 2020 09:00:28 +0000 (UTC) X-HE-Tag: veil36_0615283270a8 X-Filterd-Recvd-Size: 4734 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Sep 2020 09:00:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 70374AC4C; Thu, 3 Sep 2020 09:00:27 +0000 (UTC) Subject: Re: [PATCH v4 1/4] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags To: Alex Shi , Mel Gorman Cc: Anshuman Khandual , David Hildenbrand , Matthew Wilcox , Alexander Duyck , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <1599116482-7410-1-git-send-email-alex.shi@linux.alibaba.com> <20200903072447.GB3179@techsingularity.net> <8275cc70-fd35-25c8-36d4-525a10f05e41@linux.alibaba.com> <7813624a-d8af-f09f-d8c3-0d2a01fe5dd3@linux.alibaba.com> From: Vlastimil Babka Message-ID: Date: Thu, 3 Sep 2020 11:00:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <7813624a-d8af-f09f-d8c3-0d2a01fe5dd3@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Rspamd-Queue-Id: 4AB94800E10D X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: On 9/3/20 10:40 AM, Alex Shi wrote: >=20 >=20 > =E5=9C=A8 2020/9/3 =E4=B8=8B=E5=8D=884:32, Alex Shi =E5=86=99=E9=81=93: >>> >> I have run thpscale with 'always' defrag setting of THP. The Amean std= dev is much >> larger than a very little average run time reducing. >>=20 >> But the left patch 4 could show the cmpxchg retry reduce from thousand= s to hundreds >> or less. >>=20 >> Subject: [PATCH v4 4/4] add cmpxchg tracing >=20 >=20 > It's a typical result with the patchset: >=20 > Performance counter stats for './run-mmtests.sh -c configs/config-work= load-thpscale pageblock-c': >=20 > 9,564 compaction:mm_compaction_isolate_migratepages > 6,430 compaction:mm_compaction_isolate_freepages > 5,287 compaction:mm_compaction_migratepages > 45,299 compaction:mm_compaction_begin > 45,299 compaction:mm_compaction_end > 30,557 compaction:mm_compaction_try_to_compact_pages > 95,540 compaction:mm_compaction_finished > 149,379 compaction:mm_compaction_suitable > 0 compaction:mm_compaction_deferred > 0 compaction:mm_compaction_defer_compaction > 3,949 compaction:mm_compaction_defer_reset > 0 compaction:mm_compaction_kcompactd_sleep > 0 compaction:mm_compaction_wakeup_kcompactd > 0 compaction:mm_compaction_kcompactd_wake > 68 pageblock:hit_cmpxchg >=20 > 113.570974583 seconds time elapsed >=20 > 14.664451000 seconds user > 96.847116000 seconds sys >=20 > It's 5.9-rc2 base kernel result: >=20 > Performance counter stats for './run-mmtests.sh -c configs/config-work= load-thpscale rc2-e': >=20 > 15,920 compaction:mm_compaction_isolate_migratepages > 20,523 compaction:mm_compaction_isolate_freepages > 9,752 compaction:mm_compaction_migratepages > 27,773 compaction:mm_compaction_begin > 27,773 compaction:mm_compaction_end > 16,391 compaction:mm_compaction_try_to_compact_pages > 62,809 compaction:mm_compaction_finished > 69,821 compaction:mm_compaction_suitable > 0 compaction:mm_compaction_deferred > 0 compaction:mm_compaction_defer_compaction > 7,875 compaction:mm_compaction_defer_reset > 0 compaction:mm_compaction_kcompactd_sleep > 0 compaction:mm_compaction_wakeup_kcompactd > 0 compaction:mm_compaction_kcompactd_wake > 1,208 pageblock:hit_cmpxchg >=20 > 116.440414591 seconds time elapsed >=20 > 15.326913000 seconds user > 103.752758000 seconds sys The runs wildly differ in many of other stats, so I'm not sure they are r= eally comparable. I guess you could show the fraction of hit_cmpxchg to all cmp= xchg. But there's also danger of tracepoints widening the race window. In the end what matters is how these 1208 retries contribute to runtime. = I doubt they could be really visible in a 100+ seconds run though.