From patchwork Fri Mar 4 06:34:22 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: 12768530 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 DA2C5C433FE for ; Fri, 4 Mar 2022 06:34:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3CC6E8D0002; Fri, 4 Mar 2022 01:34:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 354AF8D0001; Fri, 4 Mar 2022 01:34:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F4CB8D0002; Fri, 4 Mar 2022 01:34:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0235.hostedemail.com [216.40.44.235]) by kanga.kvack.org (Postfix) with ESMTP id 0C6F38D0001 for ; Fri, 4 Mar 2022 01:34:44 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A5CE518116E03 for ; Fri, 4 Mar 2022 06:34:43 +0000 (UTC) X-FDA: 79205740446.27.95274F7 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by imf17.hostedemail.com (Postfix) with ESMTP id D11E540010 for ; Fri, 4 Mar 2022 06:34:42 +0000 (UTC) Received: by mail-pl1-f177.google.com with SMTP id i1so6925090plr.2 for ; Thu, 03 Mar 2022 22:34:42 -0800 (PST) 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=nuM45wFUuSIisY95WP5NVnJXEE51k6K/a85cWiasSdw=; b=NZ/9T02L0QWzrbvkMunxnYe5K8qOFLdxTBfpDLND24BMIi7xVj587ooULQE5HJGOGU R6b5K7twFUOCHG1qBR0nFtV79M6EP8g1/6bPJCC7DjRYbT90k7AicaJ/FUqAWPJhIWbg PGW7x9hkYDZ2FDwXAzuwSJWI2501Va1SUy5u69+FhhjBRnHzxz1yy8FMIyrfNcL+yH0f Gl3DiKyWyHqATXKTdCm2D+5KwY8Bo3bYUsTILW0A0K0mAWeccsWiHXU2aB2w7FdIeuT1 1DPfKZAUfDrBmxvHtdYkgM+Zrbks45rCUopCd8igu4RdbAJbxTPRbv5aRMqNDwtVtGlW GLfw== 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=nuM45wFUuSIisY95WP5NVnJXEE51k6K/a85cWiasSdw=; b=S7EcNb+g0Iwhkbt/RqThzVHu3MFZb0BHzTm6jeZKXGityX8VD7Di1rSY7Uhoy+OwOS YmnOCQOP1A6mjAlweq/dzDJh/KCHYyFKcNSwMb6MYKs0hZiHRQNn5iJ4npRqYhHzIcCn YzFVwjmnpwa8WLG5SNLGQ+xY5Bm/LPIjg42s5I2+W43nR7vvDaR1CcDolLukUSD0gnAP Ua5gnyI0i+DFGviGGjvoHCWLO88vl+P4NDqtdhZJ8oPwzsxmDv0SYLckzO6iHyoF4Du5 mIgdC/4ReGxxAq8mka1s/mOZJpbzxWjxdR/LEE07ytgV1qVESwpeo81V/VGMqhOT6lZH AxYg== X-Gm-Message-State: AOAM533L9uQFeknRbUHr3GAySqVo5LlQKRWRm4TEp74XEDTzTHVF/GQI iORZWnY0sAxefdtflag9YAx3V+pF0I/NlA== X-Google-Smtp-Source: ABdhPJwXcDCE0jyhsOvhdlUoH2suq06HPWnLwccFgZkKB2BI+sktLAq5gWxbGrH+hxa83CfdP/1psg== X-Received: by 2002:a17:902:ecc3:b0:151:c36f:d94c with SMTP id a3-20020a170902ecc300b00151c36fd94cmr44705plh.79.1646375681656; Thu, 03 Mar 2022 22:34:41 -0800 (PST) Received: from ip-172-31-19-208.ap-northeast-1.compute.internal (ec2-18-181-137-102.ap-northeast-1.compute.amazonaws.com. [18.181.137.102]) by smtp.gmail.com with ESMTPSA id v10-20020a056a00148a00b004e0f420dd90sm4900007pfu.40.2022.03.03.22.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 22:34:41 -0800 (PST) From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: linux-mm@kvack.org Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Marco Elver , Matthew WilCox , Roman Gushchin , linux-kernel@vger.kernel.org, 42.hyeyoo@gmail.com Subject: [PATCH v2 0/5] slab cleanups Date: Fri, 4 Mar 2022 06:34:22 +0000 Message-Id: <20220304063427.372145-1-42.hyeyoo@gmail.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: D11E540010 X-Stat-Signature: br9p884ewnb9z7cy8gh5tfrm6tejrfeu X-Rspam-User: Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="NZ/9T02L"; spf=pass (imf17.hostedemail.com: domain of 42.hyeyoo@gmail.com designates 209.85.214.177 as permitted sender) smtp.mailfrom=42.hyeyoo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam07 X-HE-Tag: 1646375682-227663 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: Changes from v1: Now SLAB passes requests larger than order-1 page to page allocator. Adjusted comments from Matthew, Vlastimil, Rientjes. Thank you for feedback! BTW, I have no idea what __ksize() should return when an object that is not allocated from slab is passed. both 0 and folio_size() seems wrong to me. Hello, these are cleanup patches for slab. Please consider them for slab-next :) Any comments will be appreciated. Thanks. Hyeonggon Yoo (5): mm/slab: kmalloc: pass requests larger than order-1 page to page allocator mm/sl[au]b: unify __ksize() mm/sl[auo]b: move definition of __ksize() to mm/slab.h mm/slub: limit number of node partial slabs only in cache creation mm/slub: refactor deactivate_slab() include/linux/slab.h | 36 ++++++------ mm/slab.c | 51 ++++++++--------- mm/slab.h | 21 +++++++ mm/slab_common.c | 20 +++++++ mm/slob.c | 1 - mm/slub.c | 130 ++++++++++++------------------------------- 6 files changed, 114 insertions(+), 145 deletions(-)