Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp631296rwd; Thu, 18 May 2023 01:29:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cC3cz+dE4G/XGFxpKLhj0z+g102fsQELofPg1xX+WNEhCYRO+/Hbjr0Koa7rtQVWbXsQk X-Received: by 2002:a17:90a:1616:b0:24e:28c:f391 with SMTP id n22-20020a17090a161600b0024e028cf391mr1636395pja.27.1684398591804; Thu, 18 May 2023 01:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684398591; cv=none; d=google.com; s=arc-20160816; b=HmOxIkFL66wN+kBfnDhtj+xtfbYWr1BXUIXfUEp9GdYevXi/uaogWlVIx/1r8kflN4 y94H64ddVTk/6cto+W4a1sLvDxpSYwQmdRJfmGPj97icEGarzssj7sGW3I/sQn51WKSM XmlJig5zBHIiiOgPY+H3AhC8SZ6TgJKRHxyKsZnACyRiwXLdhmR8ddnMWc1SCN37YFEk p/3ngx8XjQiUS2FLOYf5damiwTeVa2qUfksAwWTxWXWBIlwdrvq6AgWugT36r55KMHvi RG6vlgHrQ+wbQEv9gpfaKxGWXDjKBHQVeh7GaCbMLEyxHdTt6K8+qqLrrfR/v2jzojbR tiTg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TDP6akndGYY+NNyk+HMS4yjJy8NmG548QUO0jiQLlHc=; b=XSepRuYArJLc0t8Y7Forn9ihjKfCOzEnaKY58AP+8REZ2MboA2L4UKWqETm87wRK+S 7CgELrbaQeJfJ4JiHoj2upJqqeaJm1jIbW6/f2lnXNOH8YRTMxaZh9gANXUaATYqOD6S /rWb7BARK113MnD9+e468cg8rX/jQcvDHdF+DhNjyM6VTn99vAS5PY2YFogHXnWLgOeR IJ7y991Ry50R+Zh8c2uPfVD4yPxHW+1yQo5RZZWK1iT53mezOtcX4zTs01iatfB1hZu0 rPfVWzbW0iJDoKM5sRJnUWLY0gnmdQ9hiFaaW1I3sHnVwpNztP/X0iSRcv8K9f5Kq1tA pTPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mjQ0XqRW; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k69-20020a638448000000b0051909d663desi882324pgd.481.2023.05.18.01.29.39; Thu, 18 May 2023 01:29:51 -0700 (PDT) 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=mjQ0XqRW; 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 S229985AbjERIQm (ORCPT + 99 others); Thu, 18 May 2023 04:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbjERIQk (ORCPT ); Thu, 18 May 2023 04:16:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF26310D0 for ; Thu, 18 May 2023 01:16:39 -0700 (PDT) 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 7ED6F647E0 for ; Thu, 18 May 2023 08:16:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFB25C4339B; Thu, 18 May 2023 08:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684397798; bh=u4N5s5RzImHaTfp18DwzdbANHCGhKwG99M7Qtmr7Vp0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mjQ0XqRWMp7+/p6DmBQ+47YMSdEedt1UquGqUhkhiY1xqKUJn1Fw66JdqI3VmQw+s C/lXPuwPYzNBoQC17STDr7VUDf17rl71CmamWt6ezDHfcB2S4FOfYwEUWSS8sEBRI9 gB82/xUkGZilsGa59PD2CzJr89yfvwOI/LZjMObPa5jfg0eHVOF0kYkriJCDsllZ2k N7WG7SI2AeHs+Ciwc0YAgs/Jvbsjm2n9yOwhSXyomlv9nEhtDHRj0E1fjTL0WDzPsX yKWxunNaAlVDOJRdTZBz0yJe3B7S+Qtb6y+000qp/7qNwwEo9AD1HxxG/J+7IxBu4s KsTAAJlSOMtcA== Date: Thu, 18 May 2023 10:16:32 +0200 From: Christian Brauner To: Mike Christie Cc: Linus Torvalds , oleg@redhat.com, linux@leemhuis.info, nicolas.dichtel@6wind.com, axboe@kernel.dk, ebiederm@xmission.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, mst@redhat.com, sgarzare@redhat.com, jasowang@redhat.com, stefanha@redhat.com Subject: Re: [RFC PATCH 2/8] vhost/vhost_task: Hook vhost layer into signal handler Message-ID: <20230518-zuschauen-windhund-48949c34a524@brauner> References: <20230518000920.191583-1-michael.christie@oracle.com> <20230518000920.191583-3-michael.christie@oracle.com> <3c2adf29-c201-9534-cc07-d35c4dead948@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3c2adf29-c201-9534-cc07-d35c4dead948@oracle.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 17, 2023 at 08:01:45PM -0500, Mike Christie wrote: > On 5/17/23 7:16 PM, Linus Torvalds wrote: > > On Wed, May 17, 2023 at 5:09 PM Mike Christie > > wrote: > >> > >> + __set_current_state(TASK_RUNNING); > >> + rc = get_signal(&ksig); > >> + set_current_state(TASK_INTERRUPTIBLE); > >> + return rc; > > > > The games with current_state seem nonsensical. > > > > What are they all about? get_signal() shouldn't care, and no other > > caller does this thing. This just seems completely random. > > Sorry. It's a leftover. > > I was originally calling this from vhost_task_should_stop where before > calling that function we do a: > > set_current_state(TASK_INTERRUPTIBLE); > > So, I was hitting get_signal->try_to_freeze->might_sleep->__might_sleep > and was getting the "do not call blocking ops when !TASK_RUNNING" > warnings. Also seems you might want to check the return value of you new helper...