Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp131513pxb; Thu, 2 Sep 2021 21:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfz/4KatZo7Ag3DqTdzxhYta1cT9vTFU3w89yBeJmVsdO820F0GxY7htSNh/7waEy5x9pW X-Received: by 2002:aa7:d303:: with SMTP id p3mr1921366edq.184.1630643535814; Thu, 02 Sep 2021 21:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630643535; cv=none; d=google.com; s=arc-20160816; b=0bZQAUDCQQsrcRfXk3xDoRnigN1F7GabYZeXJVbnS+9ZIlJK3PSfaZWAgusg8/6lxb pac+RelBId270zbROuh7wDP7xjYhjiYh2OIiCcV3p82luQPQJX5aYIFXy/qEcd2JEz52 HGvrAUcdzVVf+3A2DFclxL7EpJLQ4+WkJsszWOI89NdBB0snAeTvvS4thljqD87KMTUV ZZj6pfYFCkvQqnkioP9t++rlpEhRUKptoeFvscuaa7QFshSbY/emuUjKT+J+xF5aUymr +kEQW9qGGsjX+v/lDVCX9oxTmtUCntQi0aCBkJB6Fq5BAMeeqtltqdydpDclWoQQfWNJ QEEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=JE3gk6SlxtVa43SROf4qRZfaGvwqJrny9O/h89ZER10=; b=TncE7FkflxHXLhUNZnFitcsVFI1RFYrda+XL253h4KMQI1OAw50e1Z2czdL+VyOR9n gSFQSRqd5fI4CWvyhIxPvbKzYdtoRUkIhSDXe03b/nWN0ix5E9HFHAup4twC3VxFYHZ0 t26PFfcI8xFddIFtYeo3njryJ1EQu8ZMJ1D88rwTCoye6uwyBpNAtmySUhaiWz6EhhqK 768jfLZWU3KKnQOdKV8VoIiF/9NTilvMClxUkpd5ac8Ke9rdz1MWP1aDlSbxcgfCT0Rp yarHlLxCQRTpRKxi2Hm/AfquG3Ytwqvc/FQj/DqjZaIYzaCuWWlObCYY+yvLVoS6mQxq EaPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 x5si4166699ejc.347.2021.09.02.21.31.41; Thu, 02 Sep 2021 21:32:15 -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; 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 S232824AbhICEat (ORCPT + 99 others); Fri, 3 Sep 2021 00:30:49 -0400 Received: from verein.lst.de ([213.95.11.211]:53529 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232068AbhICEak (ORCPT ); Fri, 3 Sep 2021 00:30:40 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 4019668AFE; Fri, 3 Sep 2021 06:29:37 +0200 (CEST) Date: Fri, 3 Sep 2021 06:29:37 +0200 From: Christoph Hellwig To: Thomas Gleixner Cc: Linus Torvalds , "Darrick J. Wong" , Dennis Zhou , Tejun Heo , linux-fsdevel , linux-xfs , Dave Chinner , Linux Kernel Mailing List , Eric Sandeen , Christoph Hellwig Subject: Re: [GIT PULL] xfs: new code for 5.15 Message-ID: <20210903042937.GA21466@lst.de> References: <20210831211847.GC9959@magnolia> <87wnnybxkb.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wnnybxkb.ffs@tglx> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 02, 2021 at 09:13:24PM +0200, Thomas Gleixner wrote: > > I'm only throwing this out as a reaction to this - I'm not sure > > another interface would be good or worthwhile, but that "enum > > cpuhp_state" is ugly enough that I thought I'd rope in Thomas for CPU > > hotplug, and the percpu memory allocation people for comments. > > It's not only about memory. > > > IOW, just _maybe_ we would want to have some kind of callback model > > for "percpu_alloc()" and it being explicitly about allocations > > becoming available or going away, rather than about CPU state. > > The per cpu storage in XFS does not go away. It contains a llist head > and the queued work items need to be moved from the dead CPU to an alive > CPU and exposed to a work queue for processing. Similar to what we do > with timers, hrtimers and other stuff. > > If there are callbacks which are doing pretty much the same thing, then > I'm all for a generic infrastructure for these. In the block layer we've added a new per-cpu bio list, for which the dead callback literally does nothing but free some memory. For that case a simple callback would be neat, but I'm not sure how common that is.