Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3773107pxb; Wed, 13 Oct 2021 12:38:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5e2RilqnX14MKpdI9H3+R22cMIed/YCmhkoQkRTjh7Mj9B5nQMUJPC6BflBRKDbVFR5oU X-Received: by 2002:a62:3802:0:b0:44c:776b:f555 with SMTP id f2-20020a623802000000b0044c776bf555mr902543pfa.82.1634153931079; Wed, 13 Oct 2021 12:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634153931; cv=none; d=google.com; s=arc-20160816; b=zE5S+RZDbNNnL+cfgCc92pOZOuowzRB4IP/7O8QpDdC0gJP2wlX+rasNXHuI7gkf/S uBjL23W/KY2oBep2MyW/jkk7mrBMAk793HVMCio9VXAQALx8LolcHA6Nt43iv5n7jxX0 ZRrxBq+6m9PiQGBPQz8KbKYuP+XFQlQgXn6DdPo4VsjSER+noB+04oNkix9C4BdT8+Es w+/1/QQlMZT3ET6mjaQWJMmmEH+neliRJ4PSVtntKBNdie70rltnIeFnaSnJvdOb8mqc 9X+JzXOlupGhGX6oqzm5JT0GgKzdHvrwTDSIr/2iRV0ZoOMBYdvWZVDl6AZycUGyB9mo AV2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5ysXfPq0QY6yu3Mr2PRYWHni87cK3fDGi/ePNZtlfFU=; b=BmhLd8FfGJg5ZrJuYtoZV3JL3sLphh6td9IO6jf6XhNnUTVdURQNlr7i6UTPpbUXE0 Q1I6ulltr3AGf4gK73k/zVAEUDxtPqrUbJkIal6llI4Vd1VGRUR72HmM7GZwJTTXTn+j zpW82cV5rarAwKJtKsnBVgN5Zr3YoMBsaoepm6vjosWgh9Dfy6vs+CpUZhHDDjS0VCVI B2qcyB9sEhlHUJSbIIhMPOTSSOffigqPJEUYGW7EUP2K3XwRkUm1VWTCboVfdQGQJotF VrS3LQBJ6oCBVR05tcXK5TgUn9AllsdnFghhf6XCNtS511KZ8UdAEZu84ihNgYIpXNhu 615Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GbWkfwLW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si731586pln.261.2021.10.13.12.38.37; Wed, 13 Oct 2021 12:38:51 -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=@kernel.org header.s=k20201202 header.b=GbWkfwLW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230474AbhJMTjY (ORCPT + 99 others); Wed, 13 Oct 2021 15:39:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:33544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231654AbhJMTjW (ORCPT ); Wed, 13 Oct 2021 15:39:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4272061165; Wed, 13 Oct 2021 19:37:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634153839; bh=ifrxkWVMul5hUh9VojQ3Svlaor+10MLDookWG/BdTkw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GbWkfwLW/uKn2DMVou9PyNh0zbv687yV6FWEXMG7oEEQw5e6dUIe6s5a6v74VFaMA bqBN/+9RU1POJI+KiurGQOjMv2e9r0GAi+JJJ2x3tf41oozeXOOMEh5jIKnU4Ruyet 8Ha4RQSBnmTW9+bkPbVKdWkpiWS7rGdL6kEcUcVoFqSBqfGD3RxD1OeROdGXTzOVM/ S8m42D8NwJk/J9lAF1l38e7oI4xJ2KOw9rTD/wa+rXd+DqutxDy0WQwwFOe/OKTdB3 hsTKygW+JhRMijL7itUEFZo353mJIIc/kJe/aixSqkDeCousx/NymurL79q7167NGY ne8adtUg8JFyQ== Received: by mail-wr1-f44.google.com with SMTP id r18so11941584wrg.6; Wed, 13 Oct 2021 12:37:19 -0700 (PDT) X-Gm-Message-State: AOAM530tnUEYrQ3V8zYNNCZicgKulv3d5Y49oFAsVI70KZLCuoXhadLc k+ybqhOr09BkPV2gE6xYiLLsxiWk9KjABBsIb34= X-Received: by 2002:adf:f481:: with SMTP id l1mr1159174wro.411.1634153837697; Wed, 13 Oct 2021 12:37:17 -0700 (PDT) MIME-Version: 1.0 References: <20210929151723.162004989@infradead.org> <20210929152428.828064133@infradead.org> In-Reply-To: <20210929152428.828064133@infradead.org> From: Arnd Bergmann Date: Wed, 13 Oct 2021 21:37:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 05/11] sched,livepatch: Use wake_up_if_idle() To: Peter Zijlstra Cc: Vasily Gorbik , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Ingo Molnar , Linux Kernel Mailing List , joe.lawrence@redhat.com, =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , 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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Arnd