From patchwork Tue Jun 14 15:26:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyeonggon Yoo <42.hyeyoo@gmail.com> X-Patchwork-Id: 12881253 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 6F6D7C43334 for ; Tue, 14 Jun 2022 15:27:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AA86A6B0095; Tue, 14 Jun 2022 11:27:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A58C06B0098; Tue, 14 Jun 2022 11:27:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F87D6B0099; Tue, 14 Jun 2022 11:27:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7F70B6B0095 for ; Tue, 14 Jun 2022 11:27:45 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 42BD460E37 for ; Tue, 14 Jun 2022 15:27:45 +0000 (UTC) X-FDA: 79577221290.14.6755846 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by imf12.hostedemail.com (Postfix) with ESMTP id EF55D4009F for ; Tue, 14 Jun 2022 15:27:44 +0000 (UTC) Received: by mail-pg1-f176.google.com with SMTP id r5so2101423pgr.3 for ; Tue, 14 Jun 2022 08:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mNkE/2cpgSsx8wL6pOJ1LmrVceUh6ws7e9AGHHQdYn8=; b=eFQrIFaNxjLoB4wamPx8DWX+s8SD2tFF9Mo8b7+O0O4gyq5UxgAUgRSVVablCfaZI6 FpbHww9t+JBEBaGIYKjWlA0+C+9hf+X6HxoAwxY5LRHdfBKBrKPD4So+Oqy6O418grDX SoAJm5gLvKN+dr55sz3ZT6cjjcXeDaAQndRdTu2VUIaagZmwGURgBu+5xMa6vxyYv9QA LjdG+ojw4ctFVygewSQyzh+OxOGDDs0mWxariO4VZTAjVGKvHUkKRcwIa0w+3MsD02sK OxXrT6hrKCOhoQr9bZuj9lIrprcIgM8OLf4sXYufY2fOCDuVVzJodnqWvzZ/cQCB1Ca2 VJEw== 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=mNkE/2cpgSsx8wL6pOJ1LmrVceUh6ws7e9AGHHQdYn8=; b=CPhvhXkVyICcaYLgI15JInCf3owWx90lq84JwPiZzBSnQEpZJxuiNBc/t7o4FimJXh vT4sKS73UCYPd2vgVQJ5xlYGCPL6v9veFq3CWd24UdERy01U8+H6ceCdmLILrckVoyBb DtpOdXcdA0bsYN1SNwbu/b1tGXsceMAfTfxOOIr2MaoMK5pqvpcK5qNHIQZ4gG328RIX 0lsx04ZRKcceprlMvNz1TF79i7RwLHR7BojdQ2YNtQPN0xPmwcfUiHGcGzWA0l4Y0PJp MbACYT6bV6blh9F97eW0HD4RZZqjyO5pRnK68Ta6GiohzVbnkXdu4udp1XflwWlY1t0+ OzeQ== X-Gm-Message-State: AOAM530mE8h1UFqszrXLqMj20Rgt9N9Pp7rIKNv4LK9u7T9NlASwpHVx +Ou28G8tdFdtpm+C4Q8wUEI= X-Google-Smtp-Source: ABdhPJzEIEwdxY+oWeDh9ciFiqrOPhcYHfIfr9dLDJWErALgsAKj2i7xUWK/eBlSTkudC2/9zO39dw== X-Received: by 2002:a63:8ac3:0:b0:3fc:948b:a1d9 with SMTP id y186-20020a638ac3000000b003fc948ba1d9mr4953468pgd.50.1655220463897; Tue, 14 Jun 2022 08:27:43 -0700 (PDT) Received: from hyeyoo.. ([114.29.24.243]) by smtp.gmail.com with ESMTPSA id e3-20020a17090ac20300b001ea5ef30096sm9598517pjt.10.2022.06.14.08.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 08:27:43 -0700 (PDT) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Matthew Wilcox Cc: linux-mm@kvack.org Subject: [PATCH 0/2] slab bulk alloc/free cleanups Date: Wed, 15 Jun 2022 00:26:33 +0900 Message-Id: <20220614152635.23353-1-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655220465; a=rsa-sha256; cv=none; b=577SF3/M2NEezwhNlbrsgyRQXSk+uezou9AexFR6s85FmPqqvCwLV0gMQSn8af9qytahz9 uqM59z70vITD9Qp+LeAvPTBv/0ETkFLKywsnw7MbtDD84uLuMQhlkY8P/RQ/PtYhO/+L0H 0eiwTs9EAmGzQdGGWPFnDmndXkpdCTY= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=eFQrIFaN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf12.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.215.176 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655220465; 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:references:dkim-signature; bh=mNkE/2cpgSsx8wL6pOJ1LmrVceUh6ws7e9AGHHQdYn8=; b=GB4wrDX4u8y/4j2h+O6du63kuZWYmELmttXEwGNKn9KZRkS3gpelY/ZZQlRsDQfYx0oM7v ePKNKIfmVfpmO2klwPAjZ5jnl3vlC5ss6MNyQJ+pwshtlnwFG820x3ClwMbxZiQaNV1HGE jWBg/HpDICg9Ipjm77iwCjJk7rfWiiE= X-Rspamd-Queue-Id: EF55D4009F X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=eFQrIFaN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf12.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.215.176 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com X-Rspamd-Server: rspam06 X-Stat-Signature: nxsay61qaemt1137i5csh9qxnc7jein5 X-HE-Tag: 1655220464-171421 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 makes SLUB and SLAB use their own kmem_cache_free_bulk() (instead of __kmem_cache_free_bulk()) when kmem_cache_alloc_bulk() failed. And then it moves generic __kmem_cache_{alloc,free}_bulk to SLOB. This is suggested by Matthew WilCox. Hyeonggon Yoo (2): mm/sl[au]b: use own bulk free function when bulk alloc failed mm/slab_common: move generic bulk alloc/free functions to SLOB mm/slab.c | 2 +- mm/slab.h | 9 --------- mm/slab_common.c | 27 --------------------------- mm/slob.c | 25 +++++++++++++++++++++---- mm/slub.c | 4 ++-- 5 files changed, 24 insertions(+), 43 deletions(-)