Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4356471pxb; Thu, 14 Oct 2021 03:48:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz16muhBv5IfhoT72tTXxSOJVDXwn/ZRPyDlNYpScbqx2avaiVEZRHiuFNKUv1N3lxZNHS5 X-Received: by 2002:a05:6a00:1a88:b0:44c:cf5d:f77e with SMTP id e8-20020a056a001a8800b0044ccf5df77emr4339904pfv.23.1634208529927; Thu, 14 Oct 2021 03:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634208529; cv=none; d=google.com; s=arc-20160816; b=OihAmsisr87YKbjrvtreAIZkuXl9eSzWQHgGD2kJMSWHsgXLBUEyGAxCC3/4BuWBBE gdd4FmYtGHjqyaZxnxIi11t6BMnRM/N89hH8fQgQYhjlrNwhc4rCQFvvIFsePhIegj6i 3rquErHlHzX/99PYtOHmOGACY5ucmSyGsDE10FdQrsC34sJZykzU1j9eYEfcB6zLHDeW xCSLEk2jTP0rR9L7ZA759cOakf+Mu2JqSCGJ5ZrBxXctUTt+1Ex6TJ40U16CNSln294U ql9IRGyKSSiWFVQVozH2NTtz5ZBRzkrQ8w5W+wEEEVijbW6Iax2UlosmNovajYBUlxoD KadQ== 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=fB1kvwE0qM4yzrXOfI44LBD6xG3DWIa3nthsA9IpR10=; b=voEEx7iCTa2SiF96+JoU3FIZNkuyuedq2X6qs64lLrPtNA44NIlWlAorif4S2TJXtm plIByHWae8qC4FGFzsHJveLNlLnGkLFkXWBgSyK421i0k79ch63EUZT6plJi5ottMvBC GoCRh683RANpZYHqTnWs8zSmxchZ4hvb79gX/F5JPJilrC7HSqxH4Ci/WsifG2sSLe85 yUTwGaxP7U36Dx5pepQXTPahCp8HKUNSi+KjFDMSdIbtYHPyx3oWx16/jMQlly5GELup KCFLukZ/8V/P+mtHA3Uo+AIpblH8xiMfRR8c38zK1K5TgmLL69623wFKm8hCRWJC53LU R3wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jXapiBFT; 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 kb2si13992211pjb.108.2021.10.14.03.48.34; Thu, 14 Oct 2021 03:48:49 -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=@infradead.org header.s=casper.20170209 header.b=jXapiBFT; 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 S230192AbhJNKrw (ORCPT + 99 others); Thu, 14 Oct 2021 06:47:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbhJNKrv (ORCPT ); Thu, 14 Oct 2021 06:47:51 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 548F0C061570; Thu, 14 Oct 2021 03:45:47 -0700 (PDT) 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=fB1kvwE0qM4yzrXOfI44LBD6xG3DWIa3nthsA9IpR10=; b=jXapiBFTysoJhTJtvGjKgh4Asf xw2iBqCtedUllZzkSuBjUppeAfRHLdYsq1ZYXNggFDvf4hQs7j8Acd7m6SC3q4GNX220mIX2w20YN 1OzAHcF1r2Uzanr6bWy+BgOKpUime+px3jQ8sDM8V7HUkk54G94LHA/n5jsAGzHUAmabhdEKvVgzy 7Ax8gsN9AMwzxW0hOlVOrpeKa6Di89UHFGibqQ2W8mqHPenK6SHaDudZ405NGXmUENR9cewSHLqnF 6hZsESHKTJVIi8cd8sXLq2HEMBiKqCH3ScHYJAgzRKnaKVimZktnUZgsApm0ddNys0pVz1S77y4re /cujEGNg==; 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 #2 (Red Hat Linux)) id 1mayC4-008GQC-6F; Thu, 14 Oct 2021 10:42:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EB3B830030B; Thu, 14 Oct 2021 12:42:35 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C142120A958AA; Thu, 14 Oct 2021 12:42:35 +0200 (CEST) Date: Thu, 14 Oct 2021 12:42:35 +0200 From: Peter Zijlstra To: Arnd Bergmann Cc: Vasily Gorbik , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Ingo Molnar , Linux Kernel Mailing List , joe.lawrence@redhat.com, =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Thomas Gleixner , Heiko Carstens , svens@linux.ibm.com, sumanthk@linux.ibm.com, live-patching@vger.kernel.org, "Paul E. McKenney" , Steven Rostedt , the arch/x86 maintainers Subject: Re: [PATCH v2 05/11] sched,livepatch: Use wake_up_if_idle() Message-ID: References: <20210929151723.162004989@infradead.org> <20210929152428.828064133@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 09:37:01PM +0200, Arnd Bergmann wrote: > On Wed, Sep 29, 2021 at 6:10 PM Peter Zijlstra wrote: > > > > Make sure to prod idle CPUs so they call klp_update_patch_state(). > > > > Signed-off-by: Peter Zijlstra (Intel) > > --- > > kernel/livepatch/transition.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > --- a/kernel/livepatch/transition.c > > +++ b/kernel/livepatch/transition.c > > @@ -413,8 +413,11 @@ void klp_try_complete_transition(void) > > for_each_possible_cpu(cpu) { > > task = idle_task(cpu); > > if (cpu_online(cpu)) { > > - if (!klp_try_switch_task(task)) > > + if (!klp_try_switch_task(task)) { > > complete = false; > > + /* Make idle task go through the main loop. */ > > + wake_up_if_idle(cpu); > > + } > > This caused a build regression on non-SMP kernels: :-( > x86_64-linux-ld: kernel/livepatch/transition.o: in function > `klp_try_complete_transition': > transition.c:(.text+0x106e): undefined reference to `wake_up_if_idle' > > Maybe add a IS_ENABLED(CONFIG_SMP) check to one of the if() conditions? I'll just add a stub for that function I think. Let me rebase the thing before I push more crap ontop..