Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp168040pxb; Wed, 6 Oct 2021 02:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEv9bd1jG7LTSFjKh7rkqxhikNAc98s3tnYxCBnPVcdReC0RsrYmMiAk+ZjU5+LxI5rkvl X-Received: by 2002:a63:ff0a:: with SMTP id k10mr19501938pgi.363.1633511857811; Wed, 06 Oct 2021 02:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633511857; cv=none; d=google.com; s=arc-20160816; b=PXgYsROmm7gLGonMHj6vdUvSSHIMdYaRwCtPmUqJwEv5zyIDqII/GGCkJ4CU9p+DbR nkLVMif/qyb5If4v+gilUqWSn7vIjS7vWSH5iHegHW4MqRW7GQmnwpbbbbejTfCrtQA4 JrptMZaytijjcC0mRCj7ck+7pfE7fYQ9DTEoLrDyMMpS6CYH3UGJN3IifftPRVJgcM6y wPDvLHjDLs96tZua5f/I7XI7E0+FWGKzlDRsRfJiqe6DiaiFsGju3Jo7Ka5eFArm75Ev XsH4oM5rt/1IDF2GUnntZ57XuMM1z7ocnEdCBr7QLYeuwqm4Nw5r2FYvArFMJeSRGJUW 57NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature:dkim-signature; bh=vi8wBtlo5jemshbJR/DfVnHgxnspXcznbzVfs867agc=; b=OKUb110au+bC6HugOk4edyXARIy9+VA2u3wJgwuQV7w1dh0h5Oeb4OjMfCCL2bJMT1 q2JLKFgHimTQ7Ex5URwtd4swoHzSx7y2ITkyjlphgOEWhLb+xEPkCFcNwwNkE6Q09UL7 QaEuQRS7oBzUT4bClQptQv6edobde02jw51J0+iasrFWg6G7Y64RD2jOG7a1uFKuUymr 6SvIlQHLe0PZWXiV1wwSgKlYrp/kfQU4UlMi4Y/wvwmYXDCyK/rkumUdclpoI2CuYR25 J3D9GhvHgUFZadwjVfslHHMtQ33Bw7Dg6bIgNQpp0Goq587T56vwXdgeCBQeC58UjbSS j7iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OvxWvXN2; dkim=neutral (no key) header.i=@suse.cz; 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 l191si6791360pgd.432.2021.10.06.02.17.24; Wed, 06 Oct 2021 02:17:37 -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=@suse.cz header.s=susede2_rsa header.b=OvxWvXN2; dkim=neutral (no key) header.i=@suse.cz; 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 S237854AbhJFJSS (ORCPT + 99 others); Wed, 6 Oct 2021 05:18:18 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:50660 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbhJFJSO (ORCPT ); Wed, 6 Oct 2021 05:18:14 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id B95FC2034E; Wed, 6 Oct 2021 09:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1633511781; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vi8wBtlo5jemshbJR/DfVnHgxnspXcznbzVfs867agc=; b=OvxWvXN2RaEGsEDaAG86QI7FAOG3TzdsxDn2wqTQq+g4WEL+vrJZzwEJPz1Tl6hCRQdCMA 7H5c5j90pqXe0VbJSEqjwjiudZfNGxifvk6F29FST0VEP23OK3xFhrcFI3b2dw7gsJ+R4/ P3PZPEYJOO48vx/dUOrB5JHvmDdzWOM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1633511781; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vi8wBtlo5jemshbJR/DfVnHgxnspXcznbzVfs867agc=; b=jVYp0yN8jSF+6aun/e/t+8hqXANPZ2MHoSb4vbfjL8Q8RzZyJOfnSxNNhk/8qpGm2p9bd/ /Ry4+iqLq0xr3+Ag== Received: from pobox.suse.cz (pobox.suse.cz [10.100.2.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 67C27A3B87; Wed, 6 Oct 2021 09:16:21 +0000 (UTC) Date: Wed, 6 Oct 2021 11:16:21 +0200 (CEST) From: Miroslav Benes To: Peter Zijlstra cc: gor@linux.ibm.com, jpoimboe@redhat.com, jikos@kernel.org, pmladek@suse.com, mingo@kernel.org, linux-kernel@vger.kernel.org, joe.lawrence@redhat.com, fweisbec@gmail.com, tglx@linutronix.de, hca@linux.ibm.com, svens@linux.ibm.com, sumanthk@linux.ibm.com, live-patching@vger.kernel.org, paulmck@kernel.org, rostedt@goodmis.org, x86@kernel.org Subject: Re: [PATCH v2 05/11] sched,livepatch: Use wake_up_if_idle() In-Reply-To: <20210929152428.828064133@infradead.org> Message-ID: References: <20210929151723.162004989@infradead.org> <20210929152428.828064133@infradead.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Sep 2021, 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); > + } Right, it should be enough. Acked-by: Miroslav Benes It would be nice to get Vasily's Tested-by tag on this one. M