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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC8CCC433F5 for ; Sat, 28 May 2022 22:55:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BCC008D0006; Sat, 28 May 2022 18:55:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B76828D0001; Sat, 28 May 2022 18:55:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A40708D0006; Sat, 28 May 2022 18:55:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9041A8D0001 for ; Sat, 28 May 2022 18:55:13 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4745E34F5A for ; Sat, 28 May 2022 22:55:13 +0000 (UTC) X-FDA: 79516659306.31.97D8553 Received: from rome.phoronix.com (rome.phoronix.com [192.211.48.82]) by imf17.hostedemail.com (Postfix) with ESMTP id F3DB740022 for ; Sat, 28 May 2022 22:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=michaellarabel.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rSkQingUjf0hyflP8WuA7Yt4okTQlQXsse1eci3zb2Y=; b=RYbFrKcbGCbNnF4uJU970TaQKP /4iiKFnpuXCa51gGO0jPpteZTpHlXzJk6p3Pn7PfX4skjbsPFjE72+XSCFSXLKeSON/7JGSQbI5p9 h1eDWvfklSAbHWYk39B68dM+yocZ3WiGdMOzlsM6CKf5C+r1JKXy76ruA2kMq6LVmDmVgDEjlQoDO LA+N79/GMCQMASLJDKZa0v9XFVSUkqobsOnXO/DMA6owOje+h6Ybl6cb9kCieyaaBwoq6eAWERJ7o +LlA61ixjhb4HSJlhmeYDCH94rrLH1K1cgoSJ5ZVP53mAC29mp9SNti3elCsE3nhVA+xdM8O5nruA wmajwwlQ==; Received: from c-73-176-63-28.hsd1.in.comcast.net ([73.176.63.28]:44418 helo=[192.168.1.42]) by rome.phoronix.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.95) (envelope-from ) id 1nv5Kv-0005AW-7i; Sat, 28 May 2022 18:55:08 -0400 Message-ID: <134065a4-0446-bbbc-fca8-59f32798cf08@MichaelLarabel.com> Date: Sat, 28 May 2022 17:54:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [patch v5] mm: lru_cache_disable: replace work queue synchronization with synchronize_rcu Content-Language: en-CA To: Andrew Morton , Marcelo Tosatti Cc: Borislav Petkov , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Minchan Kim , Matthew Wilcox , Mel Gorman , Nicolas Saenz Julienne , Juri Lelli , Thomas Gleixner , Sebastian Andrzej Siewior , "Paul E. McKenney" References: <20220304163554.8872fe5d5a9d634f7a2884f5@linux-foundation.org> <20220528141809.732788db257253396462c79e@linux-foundation.org> From: Michael Larabel In-Reply-To: <20220528141809.732788db257253396462c79e@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - rome.phoronix.com X-AntiAbuse: Original Domain - kvack.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - MichaelLarabel.com X-Get-Message-Sender-Via: rome.phoronix.com: authenticated_id: michael@michaellarabel.com X-Authenticated-Sender: rome.phoronix.com: michael@michaellarabel.com X-Source: X-Source-Args: X-Source-Dir: Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=michaellarabel.com header.s=default header.b=RYbFrKcb; dmarc=pass (policy=reject) header.from=michaellarabel.com; spf=pass (imf17.hostedemail.com: domain of Michael@MichaelLarabel.com designates 192.211.48.82 as permitted sender) smtp.mailfrom=Michael@MichaelLarabel.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: F3DB740022 X-Stat-Signature: istrwddto1w4aext9spjoswdegcb36py X-HE-Tag: 1653778479-939692 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 5/28/22 16:18, Andrew Morton wrote: > On Thu, 28 Apr 2022 15:00:11 -0300 Marcelo Tosatti wrote: > >> On Thu, Mar 31, 2022 at 03:52:45PM +0200, Borislav Petkov wrote: >>> On Thu, Mar 10, 2022 at 10:22:12AM -0300, Marcelo Tosatti wrote: >> ... >> >>> Someone pointed me at this: >>> >>> https://www.phoronix.com/scan.php?page=news_item&px=Linux-518-Stress-NUMA-Goes-Boom >>> >>> which says this one causes a performance regression with stress-ng's >>> NUMA test... >> Michael, >> >> This is probably do_migrate_pages that is taking too long due to >> synchronize_rcu(). >> >> Switching to synchronize_rcu_expedited() should probably fix it... >> Can you give it a try, please? > I guess not. > > Is anyone else able to demonstrate a stress-ng performance regression > due to ff042f4a9b0508? And if so, are they able to try Marcelo's > one-liner? Apologies I don't believe I got the email previously (or if it ended up in spam or otherwise overlooked) so just noticed this thread now... I have the system around and will work on verifying it can reproduce still and can then test the patch, should be able to get it tomorrow. Thanks and sorry about the delay. Michael > >> diff --git a/mm/swap.c b/mm/swap.c >> index bceff0cb559c..04a8bbf9817a 100644 >> --- a/mm/swap.c >> +++ b/mm/swap.c >> @@ -879,7 +879,7 @@ void lru_cache_disable(void) >> * lru_disable_count = 0 will have exited the critical >> * section when synchronize_rcu() returns. >> */ >> - synchronize_rcu(); >> + synchronize_rcu_expedited(); >> #ifdef CONFIG_SMP >> __lru_add_drain_all(true); >> #else >> >>