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=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 B1D59C433E0 for ; Thu, 25 Jun 2020 11:31:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 78B8E20781 for ; Thu, 25 Jun 2020 11:31:57 +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="Zx7Sk3eW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78B8E20781 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 A6A3F6B0023; Thu, 25 Jun 2020 07:31:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9DEFD6B0025; Thu, 25 Jun 2020 07:31:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78DD36B0027; Thu, 25 Jun 2020 07:31:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0097.hostedemail.com [216.40.44.97]) by kanga.kvack.org (Postfix) with ESMTP id 584636B0023 for ; Thu, 25 Jun 2020 07:31:54 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 142881EE6 for ; Thu, 25 Jun 2020 11:31:54 +0000 (UTC) X-FDA: 76967519748.09.scent79_24128ff26e4c Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id EBA57180AD820 for ; Thu, 25 Jun 2020 11:31:53 +0000 (UTC) X-HE-Tag: scent79_24128ff26e4c X-Filterd-Recvd-Size: 3406 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Thu, 25 Jun 2020 11:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=PjLLzO5wQx4wfZk2ZFJ+pm83Fj4QCXS9gP5VY0PaHDw=; b=Zx7Sk3eWFBCqBBKuXfyhQVg1oF p7gH6cmsdzHqccPJNmpdxOgl+sgwG0t124w9Vt1rfWolBA8f6Ma7ukSQDNLgDtr5kv7v3vguaCOj7 kZfbKlZwEdbKzBVFjTfJDEkeCUS+jYZDRuHHzovsz5avw4TB0coAvIshYYCJ41AacBH2Cz5Y16fZ/ RDSekd4aMUBtGb1n5EvPDhfgVarHL3+GKCEVe1bjV8w/eYepzlb94jTN99YTCRWSK3BPHVyNJTWtj IgYlgl5RfI1xFiri9/L9YNG6SDSIDLiigCypddZG9gE845s3O1Gd6rXSm+S4Q9SNyV9IVM5Pqc/r8 9pJ3FfIw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1joQ6W-0001zL-Ff; Thu, 25 Jun 2020 11:31:40 +0000 From: "Matthew Wilcox (Oracle)" To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" , linux-xfs@vger.kernel.org, dm-devel@redhat.com, Mikulas Patocka , Jens Axboe , NeilBrown Subject: [PATCH 0/6] Overhaul memalloc_no* Date: Thu, 25 Jun 2020 12:31:16 +0100 Message-Id: <20200625113122.7540-1-willy@infradead.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: EBA57180AD820 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 Content-Transfer-Encoding: quoted-printable 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: 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. Patch series also available from http://git.infradead.org/users/willy/linux.git/shortlog/refs/heads/memall= oc 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(-) --=20 2.27.0