From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC72BC4167B for ; Thu, 9 Nov 2023 17:31:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49C36280004; Thu, 9 Nov 2023 12:31:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 44A998D001A; Thu, 9 Nov 2023 12:31:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3125D280004; Thu, 9 Nov 2023 12:31:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 228048D001A for ; Thu, 9 Nov 2023 12:31:52 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id EE0651CBC09 for ; Thu, 9 Nov 2023 17:31:51 +0000 (UTC) X-FDA: 81439108422.09.8E6B5F0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf16.hostedemail.com (Postfix) with ESMTP id 160C9180006 for ; Thu, 9 Nov 2023 17:31:49 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of "SRS0=V+KD=GW=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=V+KD=GW=goodmis.org=rostedt@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699551110; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I/wBAuGwzzOx5CZiEGW3MoKlXkhYWR2dP4ms6z52S8M=; b=2J+NxiMIeWrL5NR1FDdd0D2B/sMsKoQBEoOiToOkdgR/K8SO5EsKtAHFe4yu0XKybalmfD 6f5pLNXlCxb1eKWmjJ1diDXONSkopgcMAUqt+GucpBDL0FVV9/w6Lwq3yaLxzLJhzeyd20 ZWzj+Jcq2Ymbs4btJAW8td7ZDagEwYY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of "SRS0=V+KD=GW=goodmis.org=rostedt@kernel.org" designates 145.40.68.75 as permitted sender) smtp.mailfrom="SRS0=V+KD=GW=goodmis.org=rostedt@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699551110; a=rsa-sha256; cv=none; b=qLUcg0wSxQ9lhL5V07YFgHnNs7qpIFped81oU/A5895Jf3lq5kVxZBGdkkd1aewf9XkK0q dDXRNVy1uBYsUIJRXTmMC+87dPpHHaM5JXxOc9d0NTSgchCu2v9nITa+dMzfzzzQdZUedJ hB01AuDS8eaOdH3xViWqZhBwkaC4XRU= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 56699B82169; Thu, 9 Nov 2023 17:31:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8383FC433C9; Thu, 9 Nov 2023 17:31:43 +0000 (UTC) Date: Thu, 9 Nov 2023 12:31:47 -0500 From: Steven Rostedt To: Josh Poimboeuf Cc: Ankur Arora , linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , live-patching@vger.kernel.org Subject: Re: [RFC PATCH 07/86] Revert "livepatch,sched: Add livepatch task switching to cond_resched()" Message-ID: <20231109123147.2bb11809@gandalf.local.home> In-Reply-To: <20231109172637.ayue3jexgdxd53tu@treble> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107215742.363031-8-ankur.a.arora@oracle.com> <20231107181609.7e9e9dcc@gandalf.local.home> <20231109172637.ayue3jexgdxd53tu@treble> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Stat-Signature: t9qizejj5ukw78yf4a4nmns9r849bkhu X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 160C9180006 X-HE-Tag: 1699551109-292647 X-HE-Meta: U2FsdGVkX19NFq5oYHqYfC+gIHTWN9pcnjyaAM7GF8uz1CKBFyPA8RmyOp2wCxwdBJ039XczK3nZAgNtEi2U/IVlO4DCwhEzvbqgIIYxSvjTzmGLJZdxsT73et1JP3AABdYyuXCYlEqx9926Id6nm87g/mm0EqXZdffJti0rtUfYGjfwNA549dNR0aC3JbRG9U9ciQ9mfr1qCFij0LwB87yqE3lrV1uN5SR50W/drj3Aku/XO2gqo0UwnO85CdQpOI/hQ3KTFUW10PxqJKwvf4uHv7Kv16usw/E/YymBio7pW585rEdSWvKOXaCCtDXx/R90WkxomChgRMDv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2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, 9 Nov 2023 09:26:37 -0800 Josh Poimboeuf wrote: > On Tue, Nov 07, 2023 at 06:16:09PM -0500, Steven Rostedt wrote: > > On Tue, 7 Nov 2023 13:56:53 -0800 > > Ankur Arora wrote: > > > > > This reverts commit e3ff7c609f39671d1aaff4fb4a8594e14f3e03f8. > > > > > > Note that removing this commit reintroduces "live patches failing to > > > complete within a reasonable amount of time due to CPU-bound kthreads." > > > > > > Unfortunately this fix depends quite critically on PREEMPT_DYNAMIC and > > > existence of cond_resched() so this will need an alternate fix. > > We definitely don't want to introduce a regression, something will need > to be figured out before removing cond_resched(). > > We could hook into preempt_schedule_irq(), but that wouldn't work for > non-ORC. > > Another option would be to hook into schedule(). Then livepatch could > set TIF_NEED_RESCHED on remaining unpatched tasks. But again if they go > through the preemption path then we have the same problem for non-ORC. > > Worst case we'll need to sprinkle cond_livepatch() everywhere :-/ > I guess I'm not fully understanding what the cond rescheds are for. But would an IPI to all CPUs setting NEED_RESCHED, fix it? -- Steve