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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 9942BC433F5 for ; Thu, 23 Sep 2021 10:36:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 16990610A0 for ; Thu, 23 Sep 2021 10:36:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 16990610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 73BCF900002; Thu, 23 Sep 2021 06:36:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C3DB6B0071; Thu, 23 Sep 2021 06:36:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5643C900002; Thu, 23 Sep 2021 06:36:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id 423ED6B006C for ; Thu, 23 Sep 2021 06:36:41 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DE1761831A9FC for ; Thu, 23 Sep 2021 10:36:40 +0000 (UTC) X-FDA: 78618484560.02.D68C4C3 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf24.hostedemail.com (Postfix) with ESMTP id 5AFABB0000A0 for ; Thu, 23 Sep 2021 10:36:40 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1632393398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LTguzk40ayGOML5J09jRevoLF7bYg9lkIEwM2+6eZ0w=; b=0S2tAo0/F+o1g7KpAslYegb5ydfD3kdtHL/L2e8pauBb4F7wG9K5m6Irdzv0ZRoYG7Lzxx GOeaLpFzXByXWTABZ9QDe5O/2vYQ/KmJvUw9kmmTcEVtEfZd36LTqZ6o75mlrZLWe3WIZE lz3DgkJZ9xeEQ0yGMB9SlA3Mhzym72TJAZwmyhwL5wKZKYnc9808rx0PZO9dGBhRIfyBgF BFZrCxCwb3SuPjW3tNpyajRkjFmUANBDsFVxZ8F5M+vHEkMhy9RnjeQ8cfNJQ3eweNndMI AvfZIKLlGHaOH6XyPcFpOkSBL0vE9aX9pZz7rWVmbScl5oKXZpCewB92ESgQxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1632393398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LTguzk40ayGOML5J09jRevoLF7bYg9lkIEwM2+6eZ0w=; b=Wbo8ToYQV7/QtJXaqHOhAnemnyibaMe7FhJbZvj1z6S5RnOC0Rm0UgJLr6rFCer+2GQutR A9ebVSMk3OeKkgCQ== To: Vlastimil Babka , Peter Zijlstra Cc: Nicolas Saenz Julienne , akpm@linux-foundation.org, frederic@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, cl@linux.com, juri.lelli@redhat.com, mingo@redhat.com, mtosatti@redhat.com, nilal@redhat.com, mgorman@suse.de, ppandit@redhat.com, williams@redhat.com, bigeasy@linutronix.de, anna-maria@linutronix.de, linux-rt-users@vger.kernel.org Subject: Re: [PATCH 0/6] mm: Remote LRU per-cpu pagevec cache/per-cpu page list drain support In-Reply-To: References: <20210921161323.607817-1-nsaenzju@redhat.com> <20210922112817.GO4323@worktop.programming.kicks-ass.net> <87v92sgt3n.ffs@tglx> Date: Thu, 23 Sep 2021 12:36:37 +0200 Message-ID: <878rznh93e.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5AFABB0000A0 X-Stat-Signature: 3o67mzgxy4p7a9amhkfup1ud3bfcfidt Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="0S2tAo0/"; dkim=pass header.d=linutronix.de header.s=2020e header.b=Wbo8ToYQ; spf=pass (imf24.hostedemail.com: domain of tglx@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=tglx@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de X-HE-Tag: 1632393400-50881 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: Vlastimil, On Thu, Sep 23 2021 at 09:12, Vlastimil Babka wrote: > On 9/23/21 00:09, Thomas Gleixner wrote: >> local_lock() -> preempt_disable() >> local_lock_irq() -> local_irq_disable() >> ... > > Yes, to be clean, this would have to be a new primitive, not just an abused > local lock. It would just look similar to the RT version (a percpu array of > spinlocks), so for this patchset it would allow not to have two such locks > side be side (local + spin) while only one is being used. For maximum > flexibility the initialization would take a CONFIG_ (or something > compile-time bool) that when false would make the !RT version an empty > struct and "locking" would rely on preempt/irq disable (just as with !RT > local_lock). If compile-time true it would take a static key to decide on > boot whether the !RT version only does the preepmt/irq disable or actually > takes the lock. > > But as you say below, it's too much complexity for questionable benefit. > > But maybe this can all be avoided anyway, as I recalled what we do for > vmstat already (IIUC). See quiet_vmstat() - when cpu enters the nohz mode, > it flushes per-cpu vmstat diffs and then there's no reason to further > disturb the cpu to do that while it's on NOHZ mode. We could do the same for > lru pagevecs and pcplists? I'm not sure about this. I like the idea of being able to offload things to housekeeping CPUs not only in the full isolation case. A good example is RCU which allows to offload all RCU processing to some other CPU(s), which is useful even w/o full isolation. The synchronous quiescing on entering NOHZ full mode is a cute workaround but for one it makes entering NOHZ full more expensive and it does not necessarily provide good isolation guarantees under all circumstances, while a full remote processing definitely does. I think it's at least worthwhile to investigate. Thanks, tglx