Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp105052ybt; Thu, 25 Jun 2020 16:33:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNx7FdLBzKwsTQa6l3TOxdHYjpNsUGKeB6cfDQ5Wl2ermpAKSAdWNRKbf5fT6I0M0mZJ4D X-Received: by 2002:a17:906:ccd3:: with SMTP id ot19mr199234ejb.468.1593128004229; Thu, 25 Jun 2020 16:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593128004; cv=none; d=google.com; s=arc-20160816; b=F83FHHMC45p1uS6Lk6FHpu2L3om/npLagtyG3sDzXxTK9dr752KIw4uAYwQDH1K2MT 3lqDbSeVM//0LEMvv5Zl1b9d2c7C0FCwCMUdyNXKMoZB5U06W30agTpLXrx6Cp1okIu6 FWSYsgf7XRfIoDzgunoHQI3inZ1Ew+LmSKQl2l8Vj0utnRX9t57T9+K4QvXZSucwBjtC jl7kbUpel2ZRb/QvSyGslGXILIS0+9Mqh4VUsVwEscL8MFp8/N2gqQivlOp/S9Kbp198 QfgLu1qesKuywOe+qFRa0ShEpnVu43fuSCvgc8m+RDWzUlLNcxv1YD9erS0c37aV1TwN +fLg== 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=rO9wobKDdJfB6GpyJylYAIJ+kYKUiyATVCtaBeDI+fw=; b=VElt8Oq4PFaO3EoV9rXryA5DcE2oqZ3kLGPN0cm3iyduxOxIOrl6kuOCUrNMGu2D5O 5ZqzzyQ3wa22cJSbfPTDhEzWOFRaXQagKiHO6U0iGis9xjt12BUf7GLzo4qa4mvnJ/Nf QTZAj8PppDhdB6mUIIzoaIrxMKAaRi09d0uMB5ngoa+2bwY6xnFJ1dglWp3353jRYfJw qGdf4w1U5A74yNLWaEPZkwDfq8/KpI43513Vyw3O6mHFsE2qJbYO4BY+Utef/7BEswHq QjurhhRpU+NThP2UsDgj4WNjYYtGMs4sLo3DMnFJgqoxcpClUmY5+Kql1LDEpgSKE6Bw vtWg== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si10490768ejx.555.2020.06.25.16.33.00; Thu, 25 Jun 2020 16:33:24 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407138AbgFYUgQ (ORCPT + 99 others); Thu, 25 Jun 2020 16:36:16 -0400 Received: from mail-ej1-f66.google.com ([209.85.218.66]:37160 "EHLO mail-ej1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404952AbgFYUgQ (ORCPT ); Thu, 25 Jun 2020 16:36:16 -0400 Received: by mail-ej1-f66.google.com with SMTP id mb16so7275884ejb.4; Thu, 25 Jun 2020 13:36:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rO9wobKDdJfB6GpyJylYAIJ+kYKUiyATVCtaBeDI+fw=; b=uOcxQeelA24/Lg0nZPPuLL/Vwiu4S7nffOhYaeTfohI2o7tubip6D9C0qov+2esBO3 XC1/Ht/PduI+y6XOc/sx1zswM093dryH2hqLkl610Mbo2pJ7ejvga5CMmpWcsuOpWiy5 Rl1GAA3w8bpUKbnD+/e6sY+qRg1AfsYrYxHfRj0mbhfgSiadnryFU4T7hvpE+QB7Sav9 Ist8iBCjuQX8isRIBQ11cbqATUgiXZMaN6hRIyZPcTNP0kMUWb2Nu2TLL3I5B3O+VTrV Rfzcr+V2tvwOXzC7LGRSsa7cxM5VmA61vw3ODM2Q7ZR4BNg5LdzZcxPfXsmWJigMg0io J/zA== X-Gm-Message-State: AOAM530xckj2lFofpjmL3fM7Gy/+N6MVVb3VhYbA+/ZLSMGX8D8xt4lJ VLN/CniEQOnnVZXBAzhaHpI= X-Received: by 2002:a17:906:4f87:: with SMTP id o7mr30542289eju.233.1593117374457; Thu, 25 Jun 2020 13:36:14 -0700 (PDT) Received: from localhost (ip-37-188-168-3.eurotel.cz. [37.188.168.3]) by smtp.gmail.com with ESMTPSA id bs18sm3790352edb.38.2020.06.25.13.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 13:36:13 -0700 (PDT) Date: Thu, 25 Jun 2020 22:36:11 +0200 From: Michal Hocko To: "Darrick J. Wong" Cc: "Matthew Wilcox (Oracle)" , 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: <20200625203611.GS1320@dhcp22.suse.cz> References: <20200625113122.7540-1-willy@infradead.org> <20200625184832.GP7606@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200625184832.GP7606@magnolia> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Hope this clarifies it a bit. -- Michal Hocko SUSE Labs