From patchwork Mon Oct 25 15:02:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 12582067 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F235C433FE for ; Mon, 25 Oct 2021 15:03:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DC04860D43 for ; Mon, 25 Oct 2021 15:03:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DC04860D43 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7FD28940009; Mon, 25 Oct 2021 11:03:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7AC48940007; Mon, 25 Oct 2021 11:03:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69B68940009; Mon, 25 Oct 2021 11:03:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 5A388940007 for ; Mon, 25 Oct 2021 11:03:40 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A08A71809CD8E for ; Mon, 25 Oct 2021 15:03:39 +0000 (UTC) X-FDA: 78735278958.07.53AC425 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by imf28.hostedemail.com (Postfix) with ESMTP id 3F9C490000A9 for ; Mon, 25 Oct 2021 15:03:39 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id w15so575666edc.9 for ; Mon, 25 Oct 2021 08:03:39 -0700 (PDT) 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=dzBIoeOifARtzlM/P1F6nuzN/BEpSFNhUwVbX96EjJQ=; b=tegJotct9CuSpmoADW/pgCBTDfl+f1106Q/+/UlRobxTSElNeYeRWfJedDnw8HnNzo NLrwdkO9BehV8+EAuGAXCjEGAMgrbe1pMwuCErwI1DzJwvIBWnQpR+ewv3EavopSUVML cMcQEHQuEFQH97wQ5u4oRilrKoXdkvrJSFuWcxJT5FOHJ7uP9047+WBQgibK0WLs7ryo FtCip/Lf7/3Ptgkc/siBSUtPj5F2p2myqu5Z72IUQJ4MYTMnfFRYbprr0BxV6CCOmGUh iE0T24AKNIdwIuA5NeFSHadQYKQY4DK4+hIy3HbbWwlySJXSlIoY5gyu23sFQIiiGPzq sH3w== X-Gm-Message-State: AOAM532YqSQ+Gr6SvhO3v4ou5+iErkJmVr8JD9hrptPPVWVgROO7/0YT /Uu7ssSfV00v1oF/LqsTMQcSd4mxEgM= X-Google-Smtp-Source: ABdhPJzAPclHOdCs8TGK9y//K5TYr7tyh/pAD9g5HQNGIk69ckb13Ts14qqt4C7a73m08tJvIkaIVQ== X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr23065569ejc.247.1635174155105; Mon, 25 Oct 2021 08:02:35 -0700 (PDT) Received: from localhost.localdomain (ip-85-160-34-175.eurotel.cz. [85.160.34.175]) by smtp.gmail.com with ESMTPSA id u23sm9098221edr.97.2021.10.25.08.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 08:02:33 -0700 (PDT) From: Michal Hocko To: Cc: Dave Chinner , Neil Brown , Andrew Morton , Christoph Hellwig , Uladzislau Rezki , , LKML , Ilya Dryomov , Jeff Layton Subject: [PATCH 0/4] extend vmalloc support for constrained allocations Date: Mon, 25 Oct 2021 17:02:19 +0200 Message-Id: <20211025150223.13621-1-mhocko@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Stat-Signature: 5unpg6kwm5fgitiioi366zp8bmyxzm8c Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=kernel.org (policy=none); spf=pass (imf28.hostedemail.com: domain of mstsxfx@gmail.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 3F9C490000A9 X-HE-Tag: 1635174219-287009 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, this has been posted as a RFC previously [1] and it seems there was no fundamental disagreement about the approach so I am dropping RFC and I have also integrated some feedback from that discussion. 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. Please note that this is RFC and I haven't done any testing on this yet. I hope I haven't missed anything in the vmalloc allocator. It would be really great if Christoph and Uladzislau could have a look. Thanks! [1] http://lkml.kernel.org/r/20211018114712.9802-1-mhocko@kernel.org [2] http://lkml.kernel.org/r/163184741778.29351.16920832234899124642.stgit@noble.brown