Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp80746pxb; Thu, 7 Jan 2021 22:25:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMqG50ioErZIypT37b72w/77u0UMwQTNXtpRRUzxzdZhhRVbWpWnMjG3nlkKmfmRKjoVB3 X-Received: by 2002:a17:906:e84:: with SMTP id p4mr1700580ejf.141.1610087138242; Thu, 07 Jan 2021 22:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610087138; cv=none; d=google.com; s=arc-20160816; b=loL5qRd7sp7u9yaaB80E6gFhcPQNhIhdzmY57tOOdqI9+cNU1rRYH/sU/kekSPpnlb EAruwioO2VDdx0YhcrQHvufH7toyvzaNuEDUFm+71H8F599Vc11EnRWtrVa3tOwKCjbT LxCSSqGcw8BVY8Ziw+5Smj2s4N1IPfsdaDQ9ua3rzlpZPDBZ7dgxVMozvGkiHjAVumGd I/z6AKE8uucP22LEYC7ZbWm1J7XS9PXNvV9FiaBgeMcP3QWAszO0OM8v2Nek0XSNj2aN gajD9h6QFs69bQc6JvWTakv96Mt5QLUtK4/38ZavGk610KWFH81++HYNntvQmLDBXX+P dGLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=+BXqYuV606VS+I9TLOan9ji/x66HZzEGa+6VU8SPpto=; b=kXBKiGyLkWp201wG0gF075zyNGe6hliceoYbCTyS7ulpMx0pI5C9YS2C4GEO13+7+S x/zQPBngIEXFIr3JTviqokpDXWlmA/5oT1/r++sPkjj2v8e2na0fx0b3cO+MkIKZIIfg AP1a9EWcLoybPJxJbEbTj5eFvC0PyjFsbEH3Wyi6RTcnRtak6P1bQZAx016ygUaZVDPm WMPzXqjv/PhOh8BrCqT5+/LDuy6JD50lezXzC/GCOlmWmxWYjAmoXiWxJC1B2jUcCWTC gGwFFOVNwpSJUwis2217aTb7O9C+5u7B79m0Mza+p/8hLyErn9vbWcdB6qUcIIWLDBoi vzqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BnzjqYqe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt2si3106302ejb.124.2021.01.07.22.25.13; Thu, 07 Jan 2021 22:25:38 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BnzjqYqe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727146AbhAHGWp (ORCPT + 99 others); Fri, 8 Jan 2021 01:22:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbhAHGWo (ORCPT ); Fri, 8 Jan 2021 01:22:44 -0500 Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B42FC0612F4; Thu, 7 Jan 2021 22:22:04 -0800 (PST) Received: by mail-io1-xd36.google.com with SMTP id u26so8761313iof.3; Thu, 07 Jan 2021 22:22:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=+BXqYuV606VS+I9TLOan9ji/x66HZzEGa+6VU8SPpto=; b=BnzjqYqeUviOOTXnVOHyxtQu5K2hQowAQMN86mArwBR65C8hvy4jsmIK1Vp41IZBQf UwXAOAgRJEezruGzjfp9DlA/vnbJCg6G5gUWVX1KPbmwCcAFNOKsINyqRzzXRCjCzYMC LIJs2cEvW+s3eY0YRjQ8t1+DA7pE16IoE2SAM8VvSVPlucHYbJuUHnW2qoA8HliTk/jl CzYgYgH6TJQ/MuDkx2OSqwIp+j614gHG1NAkeekT9wUB+uNvQt/uQE8zkQwbx1d+xUsH QW9nviA/LOnZMFi4T+KUCZpw3GECNrYWgAWlHgXZBEWgKKv8aWRWBIVEphcbWb80I5Ii H8Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=+BXqYuV606VS+I9TLOan9ji/x66HZzEGa+6VU8SPpto=; b=N0ITiqn9dG0SrtRGbUrf3AsTxsGWQvWwrCmyRLuKkKouRxm7pWzZ7LkbJRzWWRQE90 HHdo1VqQbtVROX9XaoPFRejE1wWFU03HRwNw8mUy1y50WTpxW6stT4qsvunhazYCkK8Q qJpM9gE8h1nqHB2Aj2p0LtUCkV7zHEXR2sOybvr9B05Mx2vjbeGvU9nLEqdKnk31QrxW 4ki30ATDyslyx/LRo137LTZGwB5h3QZOSBQTop8dw5PcbZ0peemsudxUIUtOo9+oyypD lXxKjt9AEEWbTQrrzkbirN4GOmEm+dx3Ygki6bhOW3ZWpTkN+qra0lHn8h17GvXtOunr K3RA== X-Gm-Message-State: AOAM530B+Y/elCVD4Bcm3BKS/xY3hAeByfOYnyLm6RppWq+bdQH+cemQ RzAvSU0vXUs0ciqpwBLbl2OmHuiWtnQ2nxmbblU= X-Received: by 2002:a5e:d70e:: with SMTP id v14mr4316432iom.75.1610086924081; Thu, 07 Jan 2021 22:22:04 -0800 (PST) MIME-Version: 1.0 References: <20210108052651.GM3579531@ZenIV.linux.org.uk> In-Reply-To: <20210108052651.GM3579531@ZenIV.linux.org.uk> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Fri, 8 Jan 2021 07:21:52 +0100 Message-ID: Subject: Re: [PATCH] fs: process fput task_work with TWA_SIGNAL To: Al Viro Cc: Jens Axboe , linux-fsdevel , "linux-kernel@vger.kernel.org" , Oleg Nesterov , Song Liu Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 8, 2021 at 6:30 AM Al Viro wrote: > > On Tue, Jan 05, 2021 at 11:29:11AM -0700, Jens Axboe wrote: > > Song reported a boot regression in a kvm image with 5.11-rc, and bisected > > it down to the below patch. Debugging this issue, turns out that the boot > > stalled when a task is waiting on a pipe being released. As we no longer > > run task_work from get_signal() unless it's queued with TWA_SIGNAL, the > > task goes idle without running the task_work. This prevents ->release() > > from being called on the pipe, which another boot task is waiting on. > > > > Use TWA_SIGNAL for the file fput work to ensure it's run before the task > > goes idle. > > > > Fixes: 98b89b649fce ("signal: kill JOBCTL_TASK_WORK") > > Reported-by: Song Liu > > Signed-off-by: Jens Axboe > > > > --- > > > > The other alternative here is obviously to re-instate the: > > > > if (unlikely(current->task_works)) > > task_work_run(); > > > > in get_signal() that we had before this change. Might be safer in case > > there are other cases that need to ensure the work is run in a timely > > fashion, though I do think it's cleaner to long term to correctly mark > > task_work with the needed notification type. Comments welcome... > > Interesting... I think I've missed the discussion of that thing; could > you forward the relevant thread my way or give an archive link to it? See [1]. - Sedat - [1] https://marc.info/?t=160987156600001&r=1&w=2