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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AE46C7EE23 for ; Mon, 27 Feb 2023 15:55:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229889AbjB0Pz6 (ORCPT ); Mon, 27 Feb 2023 10:55:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbjB0Pzz (ORCPT ); Mon, 27 Feb 2023 10:55:55 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C3BA2055E; Mon, 27 Feb 2023 07:55:54 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 0C2BC219F8; Mon, 27 Feb 2023 15:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1677513353; 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=wVy7ke8DgpnyB5MxY0IlbIClb/jueZuR98GJS5xVQ1E=; b=Nwlqr5Q1pDVSBbv1HNTGP+oLbGv8SgcvFTCc7whqb11+UeaOQQI2tOnEB9OGGrCGfyB13K 1U2XLoxZjRx1lONfCVkMMDtteJm8MuLMCeyMJ03MTTPK8C9YI0zWmxyKkJp8OTcZzuE4o5 7gjZCcAVp/LZ4+M6TzDF1M/Ci+QO0cs= Received: from suse.cz (pmladek.tcp.ovpn1.nue.suse.de [10.163.16.6]) (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 A43B32C141; Mon, 27 Feb 2023 15:55:51 +0000 (UTC) Date: Mon, 27 Feb 2023 16:55:47 +0100 From: Petr Mladek To: Josh Poimboeuf Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Seth Forshee , Peter Zijlstra , Song Liu , Mark Rutland , Joe Lawrence , Miroslav Benes , Jiri Kosina , Ingo Molnar , Rik van Riel Subject: Re: [PATCH v3 2/3] livepatch,sched: Add livepatch task switching to cond_resched() Message-ID: References: <4ae981466b7814ec221014fc2554b2f86f3fb70b.1677257135.git.jpoimboe@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ae981466b7814ec221014fc2554b2f86f3fb70b.1677257135.git.jpoimboe@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2023-02-24 08:50:00, Josh Poimboeuf wrote: > There have been reports [1][2] of live patches failing to complete > within a reasonable amount of time due to CPU-bound kthreads. > > Fix it by patching tasks in cond_resched(). > > There are four different flavors of cond_resched(), depending on the > kernel configuration. Hook into all of them. > > A more elegant solution might be to use a preempt notifier. However, > non-ORC unwinders can't unwind a preempted task reliably. > > [1] https://lore.kernel.org/lkml/20220507174628.2086373-1-song@kernel.org/ > [2] https://lkml.kernel.org/lkml/20230120-vhost-klp-switching-v1-0-7c2b65519c43@kernel.org > > Tested-by: Seth Forshee (DigitalOcean) > Reviewed-by: Petr Mladek > Signed-off-by: Josh Poimboeuf Just for record, I have double checked the changes against v2 and everything looks good to me. Best Regards, Petr