Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1524303pxb; Thu, 4 Feb 2021 15:40:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZtgFYiJeVWej/BVoo5JLu7g3n3/Cy/PF3RYgOZIy9WP554gij0pQazMxuvRb3ceyJ2OCP X-Received: by 2002:aa7:c9cf:: with SMTP id i15mr938025edt.296.1612482006321; Thu, 04 Feb 2021 15:40:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612482006; cv=none; d=google.com; s=arc-20160816; b=UmiVTQrpuE6aXLFPqlxgFP51t/8y8XM6mEkp9I75lCRHh2uor29KxZzry85RzWnYYs Xr80KoksSbIT0R3u3lHgfvC6t4F2vuay+/Ofzqgvy1PhVKyCGQI1ClcrA6Er5ffVpdSn fOD2KEgQGwxKgGetHzY0PaYUrgn890v9QYgNTVrcV2nzBu408jjmYETxCKY41iIudEf3 X1WFMshCuRE55xlAc0IqqOLugl17UoOgZ/j9JOTp10OIFe6z6sKzwR/3K5fFmuhuOX7m H+QaBn4rmzHNfElER8qEtzwij1fKQrfCyyVyRKngyeOoA4/bumZn9vauM0AmLxEMoKLK clRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QF37dPCi57HEpfqUEK+5VUOa3KKAQXFiBdpPks8yG20=; b=WhaF4iIEOFBCFtvVwebkYznQYEHv0MDiyW1QPTYwaQFYvRQ781q3NNt0Ew6dVFB5h0 dXURl2uTXkGyto6ZhnpNltIaPgdTKcdColL9w9fFcEFSi/kamf5OihMa4SLHO6l9Ez6i AmfiY7Jn3/r0RZ48EZ4plR7si5V2LqvsDlV8+UR4EyVbcYWQgQG0FXCI6TpjvnqueJ9P VfqIuL5BtXRekCP0QbcXC+g9wYVq8tMJ4OqzQhwV9+pZPaqY7ZV3ekB+cpO3l+QWTYIG Uf8J0VXMCDKTd1llRuuLdJ+f7HW7E5CK4DGasBZ+3EAsyUndZcAx64Wjaz89jwu2wYeN xKDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NlCodaOY; 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 g25si4087750edr.526.2021.02.04.15.39.41; Thu, 04 Feb 2021 15:40:06 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=NlCodaOY; 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 S235263AbhBDJrT (ORCPT + 99 others); Thu, 4 Feb 2021 04:47:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235073AbhBDJrS (ORCPT ); Thu, 4 Feb 2021 04:47:18 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4EFCC061573; Thu, 4 Feb 2021 01:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QF37dPCi57HEpfqUEK+5VUOa3KKAQXFiBdpPks8yG20=; b=NlCodaOYD+cypLcm3DpzdiK5SG enboRJqS7Gco2hpMe/1qaYVqdyNlxcLRp4nvUZJEg2FjEMadpp2grRgO50XSeWSi+2pvzxTpJt2xU L80uLyOvmhiADkKp93jPjS1slDGSoMJCY36LVm3Px1jF/9iCRd5EIyUa/PS1ohZEmlctc7vnci27C Og2Cd3illgZyC3Ie6gF4QqEFVonx/tmvnXfvKBVXVzFFUGvoBVGvTRvwzMod/u2JSP25tj1q44UkO qApjLYLA7hTMClH89C37qIuoIugDL2WAOM+hK8EE/upbpZTd1D4mj5i/ekzPehAFe5E6GgA9EoRon usv3VBgQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l7bDI-000g7b-9V; Thu, 04 Feb 2021 09:46:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 47F07303A02; Thu, 4 Feb 2021 10:46:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 090352138F7C5; Thu, 4 Feb 2021 10:46:10 +0100 (CET) Date: Thu, 4 Feb 2021 10:46:10 +0100 From: Peter Zijlstra To: Alexey Klimov Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, yury.norov@gmail.com, daniel.m.jordan@oracle.com, tglx@linutronix.de, jobaker@redhat.com, audralmitchel@gmail.com, arnd@arndb.de, gregkh@linuxfoundation.org, rafael@kernel.org, tj@kernel.org, lizefan@huawei.com, qais.yousef@arm.com, hannes@cmpxchg.org, klimov.linux@gmail.com Subject: Re: [PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining Message-ID: References: <20210204010157.1823669-1-aklimov@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210204010157.1823669-1-aklimov@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 01:01:57AM +0000, Alexey Klimov wrote: > @@ -1281,6 +1282,11 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target) > err = _cpu_up(cpu, 0, target); > out: > cpu_maps_update_done(); > + > + /* To avoid out of line uevent */ > + if (!err) > + cpuset_wait_for_hotplug(); > + > return err; > } > > @@ -2071,14 +2075,18 @@ static void cpuhp_online_cpu_device(unsigned int cpu) > struct device *dev = get_cpu_device(cpu); > > dev->offline = false; > - /* Tell user space about the state change */ > - kobject_uevent(&dev->kobj, KOBJ_ONLINE); > } > One concequence of this is that you'll now get a bunch of notifications across things like suspend/hybernate.