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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 99D41C433E0 for ; Thu, 25 Jun 2020 20:40:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52C422072E for ; Thu, 25 Jun 2020 20:40:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Nq4CSGHn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52C422072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EAE666B0074; Thu, 25 Jun 2020 16:40:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E5EC46B0075; Thu, 25 Jun 2020 16:40:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D74796B007B; Thu, 25 Jun 2020 16:40:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0245.hostedemail.com [216.40.44.245]) by kanga.kvack.org (Postfix) with ESMTP id BBCEF6B0074 for ; Thu, 25 Jun 2020 16:40:54 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5DF98264C4 for ; Thu, 25 Jun 2020 20:40:54 +0000 (UTC) X-FDA: 76968903228.28.bed31_220970b26e4f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 3A7D4264C1 for ; Thu, 25 Jun 2020 20:40:54 +0000 (UTC) X-HE-Tag: bed31_220970b26e4f X-Filterd-Recvd-Size: 3546 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Thu, 25 Jun 2020 20:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/2bW0xwZ5cZ7Q/OI3540tqTPoWla01utvPMOqtukTuE=; b=Nq4CSGHnylZr8gaRQjjf1h1Spy 5KaXr+5rE3qQpDgHmHRXaNi75WS05bGcWhP9acJvGqrjLtzIQDlDUPKYYeifdKt1O1R2ceBQjrJqt RzfS+A5GpcKv0a3JouZPBQnaS2zme1XtQwxgfPVmkIJKsEZze3vnzBguVXsdW3hYSN3WT7aqDleof NuzPWdhoGHkEu0+YEceVl81aLiabb6N9sfvVCtJ/824pdwZYHF5VLtDrK+XzK5Gk3qbI/u0wHMeKk t0ox8cPRLhgoRs7qPRkklJQMlBdojQQHgamSziWSII+6GN+ZFyf9bj7uK1YsZXZO1sjwKkvrptePu TZhsexJA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1joYft-00055m-0p; Thu, 25 Jun 2020 20:40:45 +0000 Date: Thu, 25 Jun 2020 21:40:44 +0100 From: Matthew Wilcox To: Michal Hocko Cc: "Darrick J. Wong" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@redhat.com, Mikulas Patocka , Jens Axboe , NeilBrown , Yafang Shao Subject: Re: [PATCH 0/6] Overhaul memalloc_no* Message-ID: <20200625204044.GH7703@casper.infradead.org> References: <20200625113122.7540-1-willy@infradead.org> <20200625184832.GP7606@magnolia> <20200625203611.GS1320@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200625203611.GS1320@dhcp22.suse.cz> X-Rspamd-Queue-Id: 3A7D4264C1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 25, 2020 at 10:36:11PM +0200, Michal Hocko wrote: > On Thu 25-06-20 11:48:32, Darrick J. Wong wrote: > > On Thu, Jun 25, 2020 at 12:31:16PM +0100, Matthew Wilcox (Oracle) wrote: > > > I want a memalloc_nowait like we have memalloc_noio and memalloc_nofs > > > for an upcoming patch series, and Jens also wants it for non-blocking > > > io_uring. It turns out we already have dm-bufio which could benefit > > > from memalloc_nowait, so it may as well go into the tree now. > > > > > > The biggest problem is that we're basically out of PF_ flags, so we need > > > to find somewhere else to store the PF_MEMALLOC_NOWAIT flag. It turns > > > out the PF_ flags are really supposed to be used for flags which are > > > accessed from other tasks, and the MEMALLOC flags are only going to > > > be used by this task. So shuffling everything around frees up some PF > > > flags and generally makes the world a better place. > > > > So, uh, how does this intersect with the patch "xfs: reintroduce > > PF_FSTRANS for transaction reservation recursion protection" that > > re-adds PF_TRANS because uh I guess we lost some subtlety or another at > > some point? > > This is independent, really. It just relocates the NOFS flag. PF_TRANS > is reintroduced for a different reason. When I have replaced the > original PF_TRANS by PF_MEMALLOC_NOFS I didn't realized that xfs doesn't > need only the NOFS semantic but also the transaction tracking so this > cannot be a single bit only. So it has to be added back. But > PF_MEMALLOC_NOFS needs to stay for the scoped NOFS semantic. If XFS needs to track transactions, why doesn't it use current->journal_info like btrfs/ceph/ext4/gfs2/nilfs2/reiserfs?