Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1714221ybt; Thu, 25 Jun 2020 12:17:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHunMrSKCnrg4RjTgozZFH/L9n3f202ZhjgitGpN3VFm63UDvAGM26SBLNmivOu43/UOXo X-Received: by 2002:a17:906:748:: with SMTP id z8mr2274762ejb.257.1593112663527; Thu, 25 Jun 2020 12:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593112663; cv=none; d=google.com; s=arc-20160816; b=uG+5FeFcPI3yTSqA0fP2TmkYtq6z4dGYZgSK7dhYy3NsKE5lUMmeXE9AurZNArBafS a/k7yWE25pXYoKdJ/RRckkBiPrJpDa6PZdWAHsTUVN548wztl8HQMReO+SKvY3u4QESM kC5I1PAWXZ49bTQ/GJMk4enL26UECqDMNzmCSSeVXqtp39TUCAdpNYxTvnUMjfVLlSeC zmvauzd6NTQSUqmhcn07c+Ur9Ru+Qrjgt0NDEQmDGQ8QlB6P7KCuuy9Rh0E6STV9alpN Oh2kUq8YNp4b3c/hgfnEsO/RbUa/i9QDRr1ABb2TyZMwsjsTNS+zF5CvHYbRfeRJSicH 1WUA== 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=9RCC71majlIfD6FawW7ZnshWLRSgVrlkvbgIdAMoVZw=; b=PwwfUHbdJe0/2MrqYk+EgbTdSAw0wpjLAdXnDufIUDk/6FeCiczDH9V+9yQ7urXWBR +D47MA4ha2omfo3nRgaaDS/NgqiN2E4PlqpHALlojQKfqERg5944qP5DLojP410MmhLf VL/V65AQl1ZI0/kHWRpK+1fbuHQ2Bhikko80FkU0cUz6uxU3M8mzjDLKYQhZlaF04dLu n2XkWL3TFd2r9bPcucyPvk9isU4NriasnyRodvSvDCRMYur68nYB65rDdVHwMcCGsuKu 1vk0gAEd2r4/z2ezJgV88CiRiw1oeYOAazKCGRtSkfygv+Du2Aiw6t7ZBB2sYtAv/bwz gzeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=YPKqmMuC; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si4029522ejo.44.2020.06.25.12.17.19; Thu, 25 Jun 2020 12:17:43 -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=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=YPKqmMuC; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406335AbgFYSvp (ORCPT + 99 others); Thu, 25 Jun 2020 14:51:45 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:52386 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405853AbgFYSvp (ORCPT ); Thu, 25 Jun 2020 14:51:45 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05PIftsV071319; Thu, 25 Jun 2020 18:50:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=9RCC71majlIfD6FawW7ZnshWLRSgVrlkvbgIdAMoVZw=; b=YPKqmMuCzSeibFuJ2EeAZ4gdRQIqyXiRa5KI72AzjCKtkQeRVrkm7D7mtr/XwXXk3sgG b4Kp/kXbfDmv3EJdk+QuOx1DrtiJLx+QNbR+/ld1Ahx4hAGSEQbn5IYiIjl5ROTMY/zX kPx9W79pH2gxgDfL4KWPIFMize8ZwgPIyPwgp6UCGn5aaVOWpV/JbZ/SNVAkzjHGHcjt d3NfydLfaKqpjd5N96cOMwrRJUMDrokhUmYa9M2IReA1QbonzF3j8W+iQGBvjmFlbhS/ 8rQh7vxZ4N/mhY39jOVxX64bt1qXZHRjnYn9fT0hdQMUT+/AaiUct6sMNFiu2ubohQAU pg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 31uustt77f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Jun 2020 18:50:36 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05PIi0fM071227; Thu, 25 Jun 2020 18:48:36 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 31uur1n5ke-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Jun 2020 18:48:36 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 05PImYeM018585; Thu, 25 Jun 2020 18:48:34 GMT Received: from localhost (/10.159.246.176) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 25 Jun 2020 18:48:34 +0000 Date: Thu, 25 Jun 2020 11:48:32 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Cc: 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: <20200625184832.GP7606@magnolia> References: <20200625113122.7540-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200625113122.7540-1-willy@infradead.org> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9663 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250112 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9663 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 cotscore=-2147483648 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 suspectscore=2 priorityscore=1501 lowpriorityscore=0 clxscore=1011 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250112 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 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? I don't have any strong opinion on this series one way or another, but seeing as that patch was generating discussion about how PF_MEMALLOC_NO* is not quite the same as PF_TRANS, I kinda want all these competing PF tweaks and reworks to come together into a single series to review, rather than the four(?) different people submitting conflicting changes. [adding Yafang Shao to cc] --D > Patch series also available from > http://git.infradead.org/users/willy/linux.git/shortlog/refs/heads/memalloc > > Matthew Wilcox (Oracle) (6): > mm: Replace PF_MEMALLOC_NOIO with memalloc_noio > mm: Add become_kswapd and restore_kswapd > xfs: Convert to memalloc_nofs_save > mm: Replace PF_MEMALLOC_NOFS with memalloc_nofs > mm: Replace PF_MEMALLOC_NOIO with memalloc_nocma > mm: Add memalloc_nowait > > drivers/block/loop.c | 3 +- > drivers/md/dm-bufio.c | 30 ++++-------- > drivers/md/dm-zoned-metadata.c | 5 +- > fs/iomap/buffered-io.c | 2 +- > fs/xfs/kmem.c | 2 +- > fs/xfs/libxfs/xfs_btree.c | 14 +++--- > fs/xfs/xfs_aops.c | 4 +- > fs/xfs/xfs_buf.c | 2 +- > fs/xfs/xfs_linux.h | 6 --- > fs/xfs/xfs_trans.c | 14 +++--- > fs/xfs/xfs_trans.h | 2 +- > include/linux/sched.h | 7 +-- > include/linux/sched/mm.h | 84 ++++++++++++++++++++++++++-------- > kernel/sys.c | 8 ++-- > mm/vmscan.c | 16 +------ > 15 files changed, 105 insertions(+), 94 deletions(-) > > -- > 2.27.0 >