Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp106707ybt; Thu, 25 Jun 2020 16:35:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj+KAMMK8yS2Oq8G8GBGwrZRJ6GbwdVpeilz2oilbC/Krx53h72vrBu5UlvoSDm243RCLG X-Received: by 2002:a50:eb06:: with SMTP id y6mr640585edp.143.1593128146298; Thu, 25 Jun 2020 16:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593128146; cv=none; d=google.com; s=arc-20160816; b=lyUfSUr/80z0/Ci93JKadmwo8odp4OHzwqYq/5xf53fxrZyKpCoP8h0oVBOG4TYzm1 TOJGnHrhcIY3DXhYUaB8ijDsNZ6H+oX1kKXYZ3F5Rr12vC15INAWLdb4iB80E+KB/zSS xFCnhVTOy0bch4WZQPI/GSG6ILFSnkbKuweWBGjWrDy2tfTQAZu9VqzV+YozdDu1CS9s DRs0Hr1n2HblDyhB1dXFuggOigaQ9tL0R2ebW8mpLGi9/6DXGL3RIkol4brz4YawcjaO UBF1HyU/fEulgaXXA3triruofKEwP1uOSF/IoT5Q6B8u1sWAiLaL5llhHk5Bj3+Zokhe nWZQ== 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 :dkim-signature; bh=/2bW0xwZ5cZ7Q/OI3540tqTPoWla01utvPMOqtukTuE=; b=ucCCeq7VxbBec2izZU/kF1jKjQExV+NQFdb3ZJyX9GiF5CNaPkBgrW/0vSXa2/Zjde 9zb2R/Ntvl9ND9CmG9771TV7hKLIYhOR1rXyyaxGyNp9kxg12e6CNsRdKLjnQnD1TVoD ZhX8HMrG4ocLl3pWAzLpQhhRTEJ1eEn8vbRRIkV/LPb9R6frgDDvIovYVePCCgz/kxO+ sISl5kMzdy431XdNBwzks5aU+xBTNfbgJcrDRHA04DUuRoel7IHwt1Ld4gewW0YkugER MOaAZa8AYH+BX1xX8JmixHeWTDW8AQIf9p5inqlvUTyma7p5WUxMmFXNjH7cY2BWO+HD Cl7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Nq4CSGHn; 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 f9si7344711edy.84.2020.06.25.16.35.23; Thu, 25 Jun 2020 16:35:46 -0700 (PDT) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=Nq4CSGHn; 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 S2391115AbgFYUlE (ORCPT + 99 others); Thu, 25 Jun 2020 16:41:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390477AbgFYUlD (ORCPT ); Thu, 25 Jun 2020 16:41:03 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1573C08C5C1; Thu, 25 Jun 2020 13:41:03 -0700 (PDT) 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?