From patchwork Sat Jan 21 07:10:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13111011 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 CA999C004D4 for ; Sat, 21 Jan 2023 07:11:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 702FB6B007B; Sat, 21 Jan 2023 02:11:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B2C86B007D; Sat, 21 Jan 2023 02:11:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57C546B007E; Sat, 21 Jan 2023 02:11:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4861B6B007B for ; Sat, 21 Jan 2023 02:11:15 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2A8B080DF6 for ; Sat, 21 Jan 2023 07:11:15 +0000 (UTC) X-FDA: 80377934910.13.DD3BF64 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf06.hostedemail.com (Postfix) with ESMTP id 790B318000F for ; Sat, 21 Jan 2023 07:11:13 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=uZDwXXMJ; spf=none (imf06.hostedemail.com: domain of BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674285073; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Bku1701L1RVMz0DvJO8KOhu9YUJbNSRasY8+kRaBijA=; b=UXo8Tcd3DrF2V7pgBmRTqKfbaYBQ5CPcdIfTOdwcBWFN6ngya2xEIKIdbtRG7EZvxa0n1H xLxZfXf8NgFP+1oiTThtDel9EKcO+RKbSlZQdGl/ujBLgIUId15I334bMPmVABcdfWYzZi eVNTCaD1/fnBiYzB6JyD/uge4cukMvA= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=uZDwXXMJ; spf=none (imf06.hostedemail.com: domain of BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+1651c3ebed9361b307e7+7090+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674285073; a=rsa-sha256; cv=none; b=33fxYs4FaGs5H/XgIp9toXtD8VtXqWKjYTFfU8553c8rflTPFyVs63W69gXUq5f+SQYa8n nxHxUPw2ApR80UF9dcD4T2JvOyZfQ+6hmgUlP4YOdzdoajqSmRcbCa12xXd55CAR5MAfOd Og4/2TXmdmzEQdStsLrT1RjE9rNEpw0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Bku1701L1RVMz0DvJO8KOhu9YUJbNSRasY8+kRaBijA=; b=uZDwXXMJEwPtdungJlU1S8TMXc AaBWPiajV1qmHuTJH5nHHxF4ndCPSScuBFsNztT5Z2CD3Gvk4KP1/+i6sHUUWMsx15ipICBnWlZpR y4SF/h//K9ROJlWkGg+S7b+qMtJcMCGJeOZRA3p0n0nJEOOnxw0V6+C4i4qPSMkZfmYJuiP0hOmpf BPmAN+sLjxU3iKKDQBUr0WgDmFQ4xpf1u8Bf1h4rF9X8ZoimwYYvjCgmGikoloU+x0xtbXdGa8rhI OGllWbcfez46BwRuRo7Vntu9AysIeebS5vUzbC4sIKDvGqtv8sH2bPykPlKQ2tN8MeC1M0JU6HFji 658ILgKw==; Received: from [2001:4bb8:19a:2039:6754:cc81:9ace:36fc] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJ81q-00DToV-Lo; Sat, 21 Jan 2023 07:11:07 +0000 From: Christoph Hellwig To: Andrew Morton , Uladzislau Rezki Cc: Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, linux-mm@kvack.org Subject: [PATCH 05/10] mm: call vfree instead of __vunmap from delayed_vfree_work Date: Sat, 21 Jan 2023 08:10:46 +0100 Message-Id: <20230121071051.1143058-6-hch@lst.de> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230121071051.1143058-1-hch@lst.de> References: <20230121071051.1143058-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 790B318000F X-Stat-Signature: rya81j69r9uhon6f4kjb74q477u9ugji X-HE-Tag: 1674285073-117035 X-HE-Meta: U2FsdGVkX1/rxyonVsRYjRkgYHYogQq78msztymMyGx+uzLkc3bW07ABFR+/r/1uW7tHCOqVwgWvdKOflcjm/SYNjPg50M7NfAtd3J1nzVayEkfdjAhNejYxyhBFohKKVnZXPlRUGrIKGVlDnD1z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4lF4PXUtu+oRDzqpESusMu35ymvfasJmRqg+neMtCegrN2NzFaPJ1MKM0UyemjTWTcekAWje4XqeOSb1cWwVvoHn5lA2NNHqRGv+MOv+A+LxBAtTH6NJT8dLP3BEKIK9iPDHZxTwyMFOvgjmMFzPEihFVZ4MXHlQtpOYRMYoFqMr4+Q2YaPqzBHu9sVxolzGPIgG3ogE9InxFexHhC9e4c8Txfof6tMP+S9zzs8/gHWWM53AOh9FCkW5ME95uwP+kIdTZgTf3GLeZCmB4IBCOEsvaF4Rr2VPrMZlaV75SvF1yF4zXbXIbAXbcnuAJKGbsr2MP9hOv71vk5BopwbDXUeSuJi7EaxQz1ZF 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: This adds an extra, never taken, in_interrupt() branch, but will allow to cut down the maze of vfree helpers. Reviewed-by: Christoph Hellwig Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: David Hildenbrand Signed-off-by: Christoph Hellwig --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index daeb28b54663d5..3c07520b8b821b 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2722,7 +2722,7 @@ static void delayed_vfree_work(struct work_struct *w) struct llist_node *t, *llnode; llist_for_each_safe(llnode, t, llist_del_all(&p->list)) - __vunmap((void *)llnode, 1); + vfree(llnode); } /**