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=-0.5 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,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 36BA5C38A2A for ; Fri, 8 May 2020 13:38:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D8B92208CA for ; Fri, 8 May 2020 13:38:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8B92208CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 69E698E0005; Fri, 8 May 2020 09:38:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 626AC8E0003; Fri, 8 May 2020 09:38:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EE758E0005; Fri, 8 May 2020 09:38:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id 33D2F8E0003 for ; Fri, 8 May 2020 09:38:05 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D9077180AD807 for ; Fri, 8 May 2020 13:38:04 +0000 (UTC) X-FDA: 76793655288.25.nest73_c1c2e0cba10a X-HE-Tag: nest73_c1c2e0cba10a X-Filterd-Recvd-Size: 2186 Received: from r3-20.sinamail.sina.com.cn (r3-20.sinamail.sina.com.cn [202.108.3.20]) by imf10.hostedemail.com (Postfix) with SMTP for ; Fri, 8 May 2020 13:38:02 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([61.51.224.194]) by sina.com with ESMTP id 5EB560B100006C62; Fri, 8 May 2020 21:37:55 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 4304215073599 From: Hillf Danton To: "Paul E. McKenney" Cc: Hillf Danton , linux-kernel@vger.kernel.org, rcu@vger.kernel.org, akpm@linux-foundation.org, linux-mm Subject: Re: [PATCH RFC tip/core/rcu] Add shrinker to shift to fast/inefficient GP mode Date: Fri, 8 May 2020 21:37:43 +0800 Message-Id: <20200508133743.9356-1-hdanton@sina.com> In-Reply-To: <20200507154910.GO2869@paulmck-ThinkPad-P72> References: <20200507004240.GA9156@paulmck-ThinkPad-P72> <20200507093647.11932-1-hdanton@sina.com> MIME-Version: 1.0 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 Thu, 7 May 2020 08:49:10 Paul E. McKenney wrote: > =20 > > +static void rcu_mph_info(void *data) > > This pointer will always be &rcu_state, so why not ignore the pointer > and use "rcu_state" below? > Yes you're right. > RCU grace periods are inherently global, so I don't know of any way > for RCU to focus on a given NUMA node. All or nothing. Or is it feasible to expose certain RCU thing to VM, say, with which kswa= pd can kick grace period every time the kthreads think it's needed? That way the work to gauge memory pressure can be off RCU's shoulders. > But on the > other hand, speeding up RCU grace periods will also help specific > NUMA nodes, so I believe that it is all good. >=20 > > +{ > > + struct rcu_state *state =3D data; > > + > > + WRITE_ONCE(state->mph_end, jiffies + HZ / 10); > > + smp_store_release(&state->mph, true); > > + rcu_force_quiescent_state(); > > +} > > + > > +static struct mph_subscriber rcu_mph_subscriber =3D { > > + .info =3D rcu_mph_info, > > + .data =3D &rcu_state, >=20 > Then this ".data" entry can be omitted, correct? Yes :) Hillf