From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63B35C433E0 for ; Fri, 8 Jan 2021 06:23:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 285D2233FB for ; Fri, 8 Jan 2021 06:23:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbhAHGWp (ORCPT ); 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-Google-Smtp-Source: ABdhPJzhG5uBfX9YM01tPrKI6tx1Oc4tW5oI9QlKp/FWFCbqz2f+3u21CqOrxcN0S5WFXEqOSnhZqnB8hCVFXrFIKw0= 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-fsdevel@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