Message ID | cover.1675969869.git.jpoimboe@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp526890wrn; Thu, 9 Feb 2023 11:23:55 -0800 (PST) X-Google-Smtp-Source: AK7set+ZLi3rxmdbqu/hL/73dU2G03n9d+DwvBM1dfSyQt7wUapJezcvlP6pJPn1RFOJQPD5lCqV X-Received: by 2002:a05:6a20:3d92:b0:be:a817:ef9d with SMTP id s18-20020a056a203d9200b000bea817ef9dmr15434558pzi.42.1675970634793; Thu, 09 Feb 2023 11:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675970634; cv=none; d=google.com; s=arc-20160816; b=JvUFRNHaV5D4r8mYW+5bHOIghhiGvh3S4R0D4j2gpOtWE0CrDZdC8jhVbsnPIqj0rW rcPVg9TFl6vaaf11Hsk4kaWWr4rHqisO/QaSlVS+bAaSB5cw964Dv9lzwBCQAex0FYf0 NkzVyqNF1kxUfkYAGlFeAIZ/dWZlhB95YUgYXHTQ6lYkWvJTWPfktxXE9vqv5FAipJyn pwH2x1pULLQGYgH0QCsW4h9KcHV1FTvNSDoCpT+ejpdxg3gIqlUcAHF08qe79cpXEmlv 74q5MGTNmBr/t4t6c993dyujvedBnI9lPaMsELwvFqBVdKkHE9Q8zQxw8P1j3INJopmg N2Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=J64IULB5lsCR3chgNG6oHoEk9sT4M3QEg6Yx0u+328g=; b=iPGb5ms93IytDxGI9OXAptKhla7S1aick4aaQX8IaYCKQ060RmaYqabhn7kc4iukSY uHJI2U+u1QXT3cft6MMQqzFhI4Dy5bUG1NyyfsGFPxLTpNppYm6m/+BjVpRFpUOqPKQ6 K7pvyIxHVjIqFCWZ298fiPVaiVcvLuK9z32l+YFt6jKFmRohHSAxCc+HqRc2IdNXpIfy nXrWXrA4uH3phEi3oYBf1Kipdhwr/tGwgpLDM1w3R3Lmm3uueBpUCz9jcWQ2spbD/tJG MvDz5PkILGGzM7aHa4G0ZNXA10i8WpgWt/b9aqk9Ah1/6pxZzeARxyMBojd3cu2w2dOh qQ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tiXrQce6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c190-20020a6335c7000000b004e5892a434bsi2628379pga.179.2023.02.09.11.23.41; Thu, 09 Feb 2023 11:23:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tiXrQce6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229741AbjBITS0 (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 9 Feb 2023 14:18:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjBITSY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Feb 2023 14:18:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA4DC458A1; Thu, 9 Feb 2023 11:18:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7C14A61BA0; Thu, 9 Feb 2023 19:18:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 559B5C433D2; Thu, 9 Feb 2023 19:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675970302; bh=2hZ074pprsWhW5GxtNrfkrbBnieK8ztCBAdaCGo+uXE=; h=From:To:Cc:Subject:Date:From; b=tiXrQce6Iv8Y+NP6DJjZMlPWSBV58IibCmYibYUBtV8JdkGFBCbdEejheiVdkZiOA +6XmISbHDCSqbsj4vL3yuIftCQWYhRNhuXsH4ciiy3M8f5X2pB1hXxFDqgIbsy8KrR veEJlvhc1thPUE57e8QvItX5u9M8sJ6ZBoFuEX1kYhZqxN11qUcPVQmp34pk1Oc9Xu /6MI1uhvB23d620xl1no+d1rgpVvI4pG8xbjp0Hp2ixZjAzFwmXUx1fndmdXBn/feH 7+XlJw/m+P/YQOfEQbwqmU/t6YabDERZS2Cp3yxLOn/8EFu3OL8h4bzO1DrGrtMXux HUD0TqN3KrzPg== From: Josh Poimboeuf <jpoimboe@kernel.org> To: live-patching@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Seth Forshee <sforshee@digitalocean.com>, Peter Zijlstra <peterz@infradead.org>, Song Liu <song@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Petr Mladek <pmladek@suse.com>, Joe Lawrence <joe.lawrence@redhat.com>, Miroslav Benes <mbenes@suse.cz>, Jiri Kosina <jikos@kernel.org>, Ingo Molnar <mingo@redhat.com> Subject: [PATCH 0/3] livepatch,sched: Add livepatch task switching to cond_resched() Date: Thu, 9 Feb 2023 11:17:46 -0800 Message-Id: <cover.1675969869.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757382584780525957?= X-GMAIL-MSGID: =?utf-8?q?1757382584780525957?= |
Series |
livepatch,sched: Add livepatch task switching to cond_resched()
|
|
Message
Josh Poimboeuf
Feb. 9, 2023, 7:17 p.m. UTC
Fix patching stalls caused by busy kthreads. Josh Poimboeuf (3): livepatch: Skip task_call_func() for current task livepatch,sched: Add livepatch task switching to cond_resched() vhost: Fix livepatch timeouts in vhost_worker() drivers/vhost/vhost.c | 3 +- include/linux/livepatch.h | 1 + include/linux/livepatch_sched.h | 29 +++++++++++++++ include/linux/sched.h | 20 ++++++++--- kernel/livepatch/transition.c | 60 ++++++++++++++++++++++++++++++- kernel/sched/core.c | 64 ++++++++++++++++++++++++++++----- 6 files changed, 161 insertions(+), 16 deletions(-) create mode 100644 include/linux/livepatch_sched.h
Comments
On Thu, Feb 09, 2023 at 11:17:46AM -0800, Josh Poimboeuf wrote: > Fix patching stalls caused by busy kthreads. > > Josh Poimboeuf (3): > livepatch: Skip task_call_func() for current task > livepatch,sched: Add livepatch task switching to cond_resched() > vhost: Fix livepatch timeouts in vhost_worker() This is working perfectly in my testing. The busy vhost threads get switched immediately. Thanks for working up these patches! Tested-by: Seth Forshee (DigitalOcean) <sforshee@kernel.org> Thanks, Seth
On Thu, Feb 09, 2023 at 11:17:46AM -0800, Josh Poimboeuf wrote: > Fix patching stalls caused by busy kthreads. > > Josh Poimboeuf (3): > livepatch: Skip task_call_func() for current task > livepatch,sched: Add livepatch task switching to cond_resched() > vhost: Fix livepatch timeouts in vhost_worker() Seems reasonable, you want me to take them through the sched tree?
On Tue, Feb 14, 2023 at 01:08:22PM +0100, Peter Zijlstra wrote: > On Thu, Feb 09, 2023 at 11:17:46AM -0800, Josh Poimboeuf wrote: > > Fix patching stalls caused by busy kthreads. > > > > Josh Poimboeuf (3): > > livepatch: Skip task_call_func() for current task > > livepatch,sched: Add livepatch task switching to cond_resched() > > vhost: Fix livepatch timeouts in vhost_worker() > > Seems reasonable, you want me to take them through the sched tree? That would be great, though first I'd like to get an ack from at least another livepatch maintainer.