Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp406602pxb; Fri, 8 Jan 2021 08:00:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWNXbxglBAYoNMoBbckdhdVlDGWCE+I88d8UxiuJ38dQDzNlmjrCCcS3oICKszLdVk+isJ X-Received: by 2002:a17:906:4c4c:: with SMTP id d12mr3082223ejw.307.1610121605890; Fri, 08 Jan 2021 08:00:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610121605; cv=none; d=google.com; s=arc-20160816; b=Giz1Dh7kWYNcaHtojVzKnHoNZ6qyLuU84DX7RpCmL2moeDxExhc1Ar5rO0pg340uul fBqSkG9wZWU73TsWsBpB4cfIM5ccuD/pY9uf57YZx2I6LokaMCYxFkgXGleg3OGl6UgJ N7qWWpyw1CeJSx5wHeGF0newCMREPdrrURXFxtLfScxw1Qc0rkk3Y/CJM3Mo76h9zzPP XsMFBlo338O2+NDiNlVSChMy7voSnApU20BCma918X2n8VQy12GFaEJQzbFmPVEdLfVf VL5LEx9X5ChDWMvQ6wOuDhpTa4GSNtznjs/isqYomda9F+gizwFrl90dpl6u7C2siu+E MSiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CTCrVE7b+EVWDxO7ey2KNCtDuFsqYo5yeGCX1CXPl+c=; b=HlI8ga7lf870ktLmMJYvi3NLXot4XAkDSigOl9fKd851TOTq9kp1VaMGhOV5uiTL2r 6hTdAe1KuFMJ/jqxOcdp3/weK3PMAygtr5ZHNVDYSVHRXSDrsJzMzY/2mYWTYcI82psT BY6ny9fwWW6G7/j+ix51lG6dnkvXuyOmHG5u0zuusbPsaoG/6ixCq5y4byqIUVxNvZmQ ydU/Pzld/t1JG/XaQRYH5TnaVhyYRMd+MuHu6wdVfDCxjdj5ACKJjnr/QxCtEsQYJJ5O qhkR6kCgfL2A1gy5Gv69Hb4OhZms1S68hdom4/cFbCRZDhyVab7G9pyAxxDJIGd+fP3G Djiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o59si3714830edd.460.2021.01.08.07.59.41; Fri, 08 Jan 2021 08:00:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbhAHP7C (ORCPT + 99 others); Fri, 8 Jan 2021 10:59:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbhAHP7C (ORCPT ); Fri, 8 Jan 2021 10:59:02 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B4AC061380; Fri, 8 Jan 2021 07:58:21 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxu9P-008Nht-Tr; Fri, 08 Jan 2021 15:58:08 +0000 Date: Fri, 8 Jan 2021 15:58:07 +0000 From: Al Viro To: Jens Axboe Cc: linux-fsdevel , "linux-kernel@vger.kernel.org" , Oleg Nesterov , Song Liu Subject: Re: [PATCH] fs: process fput task_work with TWA_SIGNAL Message-ID: <20210108155807.GQ3579531@ZenIV.linux.org.uk> References: <20210108052651.GM3579531@ZenIV.linux.org.uk> <20210108064639.GN3579531@ZenIV.linux.org.uk> <245fba32-76cc-c4e1-6007-0b1f8a22a86b@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <245fba32-76cc-c4e1-6007-0b1f8a22a86b@kernel.dk> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 08, 2021 at 08:13:25AM -0700, Jens Axboe wrote: > > Anyway, bedtime for me; right now it looks like at least for task == > > current we always want TWA_SIGNAL. I'll look into that more tomorrow > > when I get up, but so far it smells like switching everything to > > TWA_SIGNAL would be the right thing to do, if not going back to bool > > notify for task_work_add()... > > Before the change, the fact that we ran task_work off get_signal() and > thus processed even non-notify work in that path was a bit of a mess, > imho. If you have work that needs processing now, in the same manner as > signals, then you really should be using TWA_SIGNAL. For this pipe case, > and I'd need to setup and reproduce it again, the task must have a > signal pending and that would have previously caused the task_work to > run, and now it does not. TWA_RESUME technically didn't change its > behavior, it's still the same notification type, we just don't run > task_work unconditionally (regardless of notification type) from > get_signal(). It sure as hell did change behaviour. Think of the effect of getting hit with SIGSTOP. That's what that "bit of a mess" had been about. Work done now vs. possibly several days later when SIGCONT finally gets sent. > I think the main question here is if we want to re-instate the behavior > of running task_work off get_signal(). I'm leaning towards not doing > that and ensuring that callers that DO need that are using TWA_SIGNAL. Can you show the callers that DO NOT need it?