From patchwork Mon Oct 18 11:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 12566109 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 7D4D6C43217 for ; Mon, 18 Oct 2021 11:47:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 279AC60EE5 for ; Mon, 18 Oct 2021 11:47:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 279AC60EE5 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 C22CB6B0071; Mon, 18 Oct 2021 07:47:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B5BC76B0072; Mon, 18 Oct 2021 07:47:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FD1B6B0073; Mon, 18 Oct 2021 07:47:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 88D9A6B0071 for ; Mon, 18 Oct 2021 07:47:30 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 41CBC18132CF3 for ; Mon, 18 Oct 2021 11:47:30 +0000 (UTC) X-FDA: 78709383060.05.E3A47A9 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by imf05.hostedemail.com (Postfix) with ESMTP id 0F0285082D58 for ; Mon, 18 Oct 2021 11:47:25 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id w14so69741176edv.11 for ; Mon, 18 Oct 2021 04:47:29 -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=p2Caj50fH5C8evqIQEUe2oy5AoVdzAaa+Xkp8NzJGwQ=; b=ClhADx826VErWh1Ef6WTBi1D4TFipM2xDs3qniCxAS5wpP6+RgFA+oWa3um9FinXgB SDb/m12x9Z++RyK+4Jf2y3b4BqQkcODw2LZeWEGtRHvizeLwZqhLxeCenlr911JqDMuL rT0dEH9qKG0e8l1N1fqhSzmlw7CWGD9VlfkJCoi+y3qbmXyQz7ZDkf8YKxfDwuUAx8Lu 8Mv8KYbu9j4srD3DTpwTgHwY2p+1bShh9O9x+u/GnoxcLsLIrBdcFQ0XAlXMT5F6ayNt /vY6BM9+qg+wthbWPhYB9JaWXQh1n0VuXMa6i87sIxabff22JrcEQLKCPlXrTdY7zylT OI7w== X-Gm-Message-State: AOAM5334nQ52n7n5OeFu0kDheLcAWreqZoLnreBNBFc864hltbk92NrP bgzif7aQvdF+qpnSr6FQmnn2bsL+fm8= X-Google-Smtp-Source: ABdhPJxE+GzNWreIYMvEQ3Fwjp2wm2GTvRFJhQ+CYaGY86q9R2fwFjTfhgtA8KkCi9+Tbj4vZ84H4Q== X-Received: by 2002:a05:6402:5188:: with SMTP id q8mr5470110edd.332.1634557645946; Mon, 18 Oct 2021 04:47:25 -0700 (PDT) Received: from localhost.localdomain (ip-85-160-35-99.eurotel.cz. [85.160.35.99]) by smtp.gmail.com with ESMTPSA id b2sm9587458edv.73.2021.10.18.04.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 04:47:25 -0700 (PDT) From: Michal Hocko To: Cc: Dave Chinner , Neil Brown , Andrew Morton , Christoph Hellwig , Uladzislau Rezki , , LKML , Ilya Dryomov , Jeff Layton Subject: [RFC 0/3] extend vmalloc support for constrained allocations Date: Mon, 18 Oct 2021 13:47:09 +0200 Message-Id: <20211018114712.9802-1-mhocko@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 0F0285082D58 Authentication-Results: imf05.hostedemail.com; dkim=none; spf=pass (imf05.hostedemail.com: domain of mstsxfx@gmail.com designates 209.85.208.47 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-Stat-Signature: wdg4hkyp4ajx4cfxon85feg5ofujkgar X-Rspamd-Server: rspam05 X-HE-Tag: 1634557645-598704 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, based on a recent discussion with Dave and Neil [1] 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/163184741778.29351.16920832234899124642.stgit@noble.brown