From patchwork Mon Nov 22 15:32:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 12632139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2390EC433F5 for ; Mon, 22 Nov 2021 15:33:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9AD4E6B006C; Mon, 22 Nov 2021 10:32:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 95D096B0072; Mon, 22 Nov 2021 10:32:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 825A96B0073; Mon, 22 Nov 2021 10:32:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0201.hostedemail.com [216.40.44.201]) by kanga.kvack.org (Postfix) with ESMTP id 74FF06B006C for ; Mon, 22 Nov 2021 10:32:59 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3FA71182CCF45 for ; Mon, 22 Nov 2021 15:32:49 +0000 (UTC) X-FDA: 78836958858.21.B0039F9 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by imf17.hostedemail.com (Postfix) with ESMTP id D78C7F0001F2 for ; Mon, 22 Nov 2021 15:32:48 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id y13so78558899edd.13 for ; Mon, 22 Nov 2021 07:32:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gTRfBSk+x9LO50sRJgq8tyBDTsu/Q0sC1r5n7ejGQ9w=; b=nk60ySzFXpJTAbtsW+a9dTYemk5WjlXdzaKYXSZ93CNENmIiCbDpB+pIjdilNpeWMO peVrFko24bvjD68sbKn1h94SpG49NfLJpbW7BxnN5MRg3nRwEv9cYfsg3/SkPN/sWG9M S1T1kiHzi3Xdvp4k17z9bgFxqEFEFOIGZsHkePtoPaSpAHb/FMUy2eH6HBUAMOZ+d0Fn Y/5XCMkfaQLwR/cuQWHjy1BHMcmeEg9vbznaxxmHEA8jaZeOoSp4jWQPJf8VJWl9yLI9 JO690h4fJNa1kxvbP1wfMrjFLOp/IqklOqTpl+OhfpXFuy0FuVslMFT75q1s4NeaRaQN QMpQ== X-Gm-Message-State: AOAM530NGrx+604GZrcO7qGXrLhiF67lEDGsAFjXtzIYEWa6sUNWSZdb zTuCY+abR7d3xns712z8OVM= X-Google-Smtp-Source: ABdhPJwJZkSVFEgg5tE8x0mlYyjDL3+ku2hYq0MzK6qWENaRtGhDk0A9C0hK/js2yyKnw5GMHZbADA== X-Received: by 2002:a17:907:9612:: with SMTP id gb18mr41889123ejc.205.1637595165141; Mon, 22 Nov 2021 07:32:45 -0800 (PST) Received: from localhost.localdomain (ip-85-160-4-65.eurotel.cz. [85.160.4.65]) by smtp.gmail.com with ESMTPSA id q7sm4247757edr.9.2021.11.22.07.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 07:32:44 -0800 (PST) From: Michal Hocko To: Andrew Morton Cc: Dave Chinner , Neil Brown , Christoph Hellwig , Uladzislau Rezki , , , LKML , Ilya Dryomov , Jeff Layton Subject: [PATCH v2 0/4] extend vmalloc support for constrained allocations Date: Mon, 22 Nov 2021 16:32:29 +0100 Message-Id: <20211122153233.9924-1-mhocko@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Stat-Signature: 4pu67qnhtxotssyiekhwd89zzkkggjc4 X-Rspamd-Queue-Id: D78C7F0001F2 X-Rspamd-Server: rspam07 Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of mstsxfx@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none) X-HE-Tag: 1637595168-626067 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: Hi, The previous version has been posted here [1] I hope I have addressed all the feedback. There were some suggestions for further improvements but I would rather make this smaller as I cannot really invest more time and I believe further changes can be done on top. This version is a rebase on top of the current Linus tree. Except for the review feedback and conflicting changes in the area there is only one change to filter out __GFP_NOFAIL from the bulk allocator. This is not necessary strictly speaking AFAICS but I found it less confusing because vmalloc has its fallback strategy and the bulk allocator is meant only for the fast path. Original cover: Based on a recent discussion with Dave and Neil [2] I have tried to implement NOFS, NOIO, NOFAIL support for the vmalloc to make life of kvmalloc users easier. A requirement for NOFAIL support for kvmalloc was new to me but this seems to be really needed by the xfs code. NOFS/NOIO was a known and a long term problem which was hoped to be handled by the scope API. Those scope should have been used at the reclaim recursion boundaries both to document them and also to remove the necessity of NOFS/NOIO constrains for all allocations within that scope. Instead workarounds were developed to wrap a single allocation instead (like ceph_kvmalloc). First patch implements NOFS/NOIO support for vmalloc. The second one adds NOFAIL support and the third one bundles all together into kvmalloc and drops ceph_kvmalloc which can use kvmalloc directly now. I hope I haven't missed anything in the vmalloc allocator. Thanks! [1] http://lkml.kernel.org/r/20211025150223.13621-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/163184741778.29351.16920832234899124642.stgit@noble.brown Reported-by: Sebastian Andrzej Siewior Signed-off-by: Michal Hocko Acked-by: Dave Chinner Acked-by: Vlastimil Babka