Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3755779lfb; Mon, 9 May 2022 03:25:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1ySJ7dsYn+Arjn01Bd59wlWlSO05B2D/eAp6eZ060ZLSZqYSBoEYgvoPM4uD7TGkYyqU/ X-Received: by 2002:a05:6a00:bd9:b0:50e:dad:b285 with SMTP id x25-20020a056a000bd900b0050e0dadb285mr15191842pfu.40.1652091910446; Mon, 09 May 2022 03:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091910; cv=none; d=google.com; s=arc-20160816; b=JlgTojuxEnsNRAWc4HLkHkr2diutgQTYF1zcOhDa3A0IzLYf5y7sEZkbFxqp23xaqu zhAJ87ALMf6+PM5XK+kr8HYIJK/jvxwW1cGH9FsUASX22i6xkaw//iYyE3Nv7AJo0uoF UcLAz83w0RoyFFHlXGWv95EP41rZglAjD7zcyYqv10OMwphespQu1KKRIujC6GYebG+j fj8JVFUY5oMtUpCieDF+QXi50RV3St2achdpLJgm2tfzjm5/ynSlnFjwkVFJM+lSh4Qj /NRnZnawCeICLgRCS/ZEzGwwZEABA09Yg2X1+rTMrXpecmgKQybNjQEcZKKKbiBj880M MSfw== 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=IEBJMR9knINcGvQb0wARdyX8e/aHy299zvPAiP70voY=; b=LiYkK6fw8Z3bhiZjj+PApbfWf0iNLfV7yoKCF3c/2jN+8CnGYuvir8jHEkxo8A6bq2 P2L6NreELEd9jclUeH//MwSnMI+qWfpSWkq8qf7vGicL/7F9Hlq4ZYiL2TL5UcT5Tywd 5jqHnrkSl2u70AiJBrYpvr4LwKwOBTdcTiZUNT/4XapHkQekWtCbCTN2kaSBgPmog4TQ +/e37mtnLghVqFWASNWie7L3NHlMKc2LXWhLf3fp6j7bgvrVZX1KRLuXqnFOAGz+w2aD rfS6qirwH7pdDBP9R768yd0chdGmMTT7MPE6d0S5b7F5tPx6iOLtm8YOarhpcgX3Cxt3 PoTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NG5Rn2x5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y11-20020a170902cacb00b00158f04afd74si9369002pld.146.2022.05.09.03.25.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:25:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NG5Rn2x5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 26CBB248E09; Mon, 9 May 2022 03:00:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235895AbiEIHZ2 (ORCPT + 99 others); Mon, 9 May 2022 03:25:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235887AbiEIHJ6 (ORCPT ); Mon, 9 May 2022 03:09:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 011E513D723; Mon, 9 May 2022 00:06:03 -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=IEBJMR9knINcGvQb0wARdyX8e/aHy299zvPAiP70voY=; b=NG5Rn2x5w0j1AiKj2swLASyaKD qwSADVMuzFYg3aamsse/IeeWzY7ksO0qv5vrv2Yq8yhxdCMCp9MTnAK84KZwXqcgjF63mPVoMqxgc UkURpVDkQgS3rCuDNQG1dejYtXlvFNzhAKVegQPqn7qB668T0Yyrb+yuV3090l9bw4SvxdsFNZpbT BF+LoVNRNYLUlsGC/o5Kvz8+/neVLAwv8Ala4DKkCYHWRBPov2yDGsBt4SmcgXl4Tp+H8X4tbSZoG 4rpyWuBpA8MZloolgVoGB1x2uNElpfLvaZEmyAYTtcjKP1sS4GKFk5INg5O/8xakzwjTnPwSXn04M kTEPokAw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnxRf-003DIj-NP; Mon, 09 May 2022 07:04:39 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 19958980E93; Mon, 9 May 2022 09:04:37 +0200 (CEST) Date: Mon, 9 May 2022 09:04:37 +0200 From: Peter Zijlstra To: Song Liu Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, mingo@redhat.com, vincent.guittot@linaro.org, jpoimboe@redhat.com, joe.lawrence@redhat.com, kernel-team@fb.com Subject: Re: [RFC] sched,livepatch: call klp_try_switch_task in __cond_resched Message-ID: <20220509070437.GC76023@worktop.programming.kicks-ass.net> References: <20220507174628.2086373-1-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220507174628.2086373-1-song@kernel.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 07, 2022 at 10:46:28AM -0700, Song Liu wrote: > Busy kernel threads may block the transition of livepatch. Call > klp_try_switch_task from __cond_resched to make the transition easier. What will a PREEMPT=y kernel do? How is it not a problem there, and if it is, this will not help that. That is; I don't think this can be right.