Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1369092ybt; Thu, 25 Jun 2020 04:32:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFsU7n6IWlW/MnF0H1Ks042TzK5KfQB56mAF6GFcbRpwX+P3QCB9yqnUHiHfhXtq3BFY+q X-Received: by 2002:a50:d790:: with SMTP id w16mr30298527edi.231.1593084778107; Thu, 25 Jun 2020 04:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593084778; cv=none; d=google.com; s=arc-20160816; b=AjWoYuGzIfglx37QFKNJk2lHG8VTzoPl2U3fnmCdWXXUtik2u1z5nV9lyR2N0qR/HR DRkNe31oK7tuW2nFJkTBdgM3nShhbzUvkzk6Fe/AUwMT5Rr4kw85/vVuoiZH0FqT5bix MNZ6P9GKumky7PgBUsrz6RZftOXpBsBAmoXD2FGPlBbh5mblyIc5ln1cM5LKBEv9HeFV opZFWBfzpWurcl+41CWbbwVVZ6VGD+uz8+3k8wO045nfggMKbrt5sXPWI8hFXH9x6XTz MGd3Cdt4NQJE87/vnpftDw8RGq3FyUuhcKljwY9LN03SPv08VuyOzu+gPjWqXVrdcfar yLJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PjLLzO5wQx4wfZk2ZFJ+pm83Fj4QCXS9gP5VY0PaHDw=; b=r4IcS0alCV8yk/bLp+EqcCK6fzgUoAHQKntV4XKJ9OnUSxrOCJhRBubO347JSauxzv NbZ/psBTJ1ycN5I7k6inzYdd3hRKLo9ryPFk9/RTnyMa0ry5zZ2Hi9vEXQ0btoubCM2g 3sv1gPN9YrDf6BthcdSugOMD88SJbTgIQVBUbasFKrGOxwJeZQK6dg478ak7cN1Rj9mB C8yGFxP+5xeri6LYdEMPoYP9GLUhTKov5nN2yLKVKfyxZHWcK68Ma4f70FGwHJGOQIPv mgJxvE4MN/y1rQGWRhIcY+Z2pFM/jwSWGfqBUWF/C9oJ+GshKZEpcYv3xsNfbBwwagd7 1Nig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Zx7Sk3eW; 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 k91si15861154edc.296.2020.06.25.04.32.34; Thu, 25 Jun 2020 04:32:58 -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=Zx7Sk3eW; 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 S2404358AbgFYLcG (ORCPT + 99 others); Thu, 25 Jun 2020 07:32:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404307AbgFYLcD (ORCPT ); Thu, 25 Jun 2020 07:32:03 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E7EC0613ED; Thu, 25 Jun 2020 04:32:02 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/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