Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp97709pxa; Tue, 18 Aug 2020 17:15:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ+jkpmjPYM/mbpyFs6ejrh9HBNgWmkMbiVbpd37WOrE/RRSSqBvVcqP9oCWuYLPftmZ04 X-Received: by 2002:a50:ed84:: with SMTP id h4mr22477253edr.278.1597796144710; Tue, 18 Aug 2020 17:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597796144; cv=none; d=google.com; s=arc-20160816; b=NfjmZUpyyYjJlpiAPe/qRva6oxefmLhmKnxT6BE4/jedqNqtLNKmJIT8qVka4EsdPL X5/l7VI/tVqFlssEN2lU9BZhV9OSqTPu2zhgSoMBLbbv6/Gb8nvuAJWMHaTRFxsbgPG0 yPS/EgegSBfgA+HIC1pVELrdB1lWJhNgZfKLjJuz3uXHeGktwavwJ9Bimahg/Gblp/AV vs1HEs11XhEl8Mq9rfIqEIJieWJZfHOfPfontqfN+NgaOZbriIDLRykdr33lajO69uZ6 tAmtJqJkgSDwftVrP0X/m44YOORxQJzhbtJxKoucKm5qZguQK0HbzCzJt1AG/kxuNN2Y CmNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tSr61lwzUj+xHSrVPasO0EWAim4EWvQCGpCMT13xijE=; b=CQxnkLO2l7h/W4+ACcrV+rPIgRg5uwDiaVDlDsCzSsVZc4qV166dM0Nbh4uBsxgAug KikaOhZ9HX7K+GiOKlL9P5wmxmTQg7CNAYQhS9P9sn1v2HzJk+9XkBFbFT5hBmHM66Jq dFJSLeifAGi7fe/S82LOJ6hBcXEnfi4mZstGl49F72CnbgIS3Eny0A3t286c4qsn7HAA cxgs9MWHzHpZG/YY00dsXOz8GBhESLJ6yq0DN4ZrvhuY+17a9Qh1NZP+92z1+jk8hqhJ Bovct8R/XU+PvH16Zgms9aROMi3SgaZEseIf6G1g77/kVZqv4ZJaWlt+LRotlC+WAgQ9 9/XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b="iRxnC/nO"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si13858486edy.259.2020.08.18.17.15.20; Tue, 18 Aug 2020 17:15:44 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b="iRxnC/nO"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727785AbgHSAEc (ORCPT + 99 others); Tue, 18 Aug 2020 20:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726983AbgHSAEc (ORCPT ); Tue, 18 Aug 2020 20:04:32 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B031C061342 for ; Tue, 18 Aug 2020 17:04:32 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id 77so19180734ilc.5 for ; Tue, 18 Aug 2020 17:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tSr61lwzUj+xHSrVPasO0EWAim4EWvQCGpCMT13xijE=; b=iRxnC/nOppybcAojsVo0p009Ul4zniX0CYq561gKj8/PGz6vtBky6WbKCJrbe18woB 5Gvd5XtTTWz91U/YGzWZbeMIl2nAmOC04oYv1IbPzj9MHxd2KH0zLxsJpbs6p8q6BZre QQaR2gGM+yBASU5DXhq6FjMbneA1G2B1uEYTU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tSr61lwzUj+xHSrVPasO0EWAim4EWvQCGpCMT13xijE=; b=bxrIOZgDt3SqLgh5/kYZF55MnvcX2fIOgMn67n4f6dSAhd44ynPt7Vmjs7O9tkotnM rjuvIg288MTckpIly09QUyxYnLPFONkFvV2Asqmh8ZrqZ8YroSybH/KT2OnrYFbepCSj rMse4T8SmDuHM0vJqJ4lFfQLQlYwNBGZyjLLmCKAbw0FyvEiVbhdqWDOjOVteURZ02X6 I+Ycfe0QmTFTY+ES/b0/nVZFFQ6AS+y+1crDQCXH+/7cchV4cdY6WeG5D1JksSuA1jUY 7arpz4/azgmgYRucCpoXqBDKLeEZ7CjlLVKcrWVud3h722eDBPXAQEr4EiDi0BuwyGoV RTxw== X-Gm-Message-State: AOAM531kzoRpftqll7jy61zncsA9NUYcBpoetyDN9j+/gzGwFTewxOkQ +yh2Up9AfA4jV4shEIdMWcyErZiXlOIk4NTaOPb4hA== X-Received: by 2002:a92:660e:: with SMTP id a14mr20285569ilc.262.1597795471360; Tue, 18 Aug 2020 17:04:31 -0700 (PDT) MIME-Version: 1.0 References: <20200814064557.17365-1-qiang.zhang@windriver.com> <20200814185124.GA2113@pc636> <20200818171807.GI27891@paulmck-ThinkPad-P72> <20200818210355.GM27891@paulmck-ThinkPad-P72> <20200818215511.GA2538@pc636> <20200818220245.GO27891@paulmck-ThinkPad-P72> In-Reply-To: <20200818220245.GO27891@paulmck-ThinkPad-P72> From: Joel Fernandes Date: Tue, 18 Aug 2020 20:04:20 -0400 Message-ID: Subject: Re: [PATCH] rcu: shrink each possible cpu krcp To: "Paul E. McKenney" Cc: Uladzislau Rezki , qiang.zhang@windriver.com, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , rcu , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 6:02 PM Paul E. McKenney wrote: > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > > index b8ccd7b5af82..6decb9ad2421 100644 > > --- a/kernel/rcu/tree.c > > +++ b/kernel/rcu/tree.c > > @@ -2336,10 +2336,15 @@ int rcutree_dead_cpu(unsigned int cpu) > > { > > struct rcu_data *rdp = per_cpu_ptr(&rcu_data, cpu); > > struct rcu_node *rnp = rdp->mynode; /* Outgoing CPU's rdp & rnp. */ > > + struct kfree_rcu_cpu *krcp; > > > > if (!IS_ENABLED(CONFIG_HOTPLUG_CPU)) > > return 0; > > > > + /* Drain the kcrp of this CPU. IRQs should be disabled? */ > > + krcp = this_cpu_ptr(&krc) > > + schedule_delayed_work(&krcp->monitor_work, 0); > > + > > > > A cpu can be offlined and its krp will be stuck until a shrinker is involved. > > Maybe be never. > > Does the same apply to its kmalloc() per-CPU caches? If so, I have a > hard time getting too worried about it. ;-) Looking at slab_offline_cpu() , that calls cancel_delayed_work_sync() on the cache reaper who's job is to flush the per-cpu caches. So I believe during CPU offlining, the per-cpu slab caches are flushed. thanks, - Joel