Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1856512pxm; Fri, 4 Mar 2022 05:04:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTSRpBvr4gLpMvHEtcTIkqCCtVazE+Pc2RVMTlJ7/SDSedls5GaxrFoa7/JapJODBbPp7v X-Received: by 2002:a17:906:a152:b0:6cd:3098:18c9 with SMTP id bu18-20020a170906a15200b006cd309818c9mr31275724ejb.422.1646399049579; Fri, 04 Mar 2022 05:04:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646399049; cv=none; d=google.com; s=arc-20160816; b=MRlEh2zjEqUdd0A8rEX98CO0VtuiRV9pTa3LbGAmnRfu5XdAXJO4eLSkhWGr2UR8iP 2Myp38AB+9dOoQwe8Vau6yuVntM/fYBzYCoLv8N2smAIyUqS0tsBdyZ7U8GWVI4uQ/oL chaq6EEVUV6a8Z2JmSHcPB5n+xqAKE/MyE52Hga6bJBXQQM7IZ3GfUbahzfvmimSMA+S sgzZvOUa+LM43ImvzbwcoCRXu5bYY7Z/TMGQaH8o26yxtDVLa8g59Ff8LbzZQaSHYM6e vvkbxcdh3pgp2WPxi6JRmDZ1/JJwGJNie+YA2KOSbR7/UNqblLHQMwGJTy2allJSQiid WjrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nuM45wFUuSIisY95WP5NVnJXEE51k6K/a85cWiasSdw=; b=rxkOezmDrkqpWj9/dFDJK8s4mgksLa4j61UQUWZ2oLIYH9S8Qs6ydsa8hk9Z9GxSTE QzVpUzfn7w3gPxQ1el8WYXGF0UHjm0i14YM7UTJ/kZ2HHO2vvc1RZicsMTSMfw5Jw4LW O+/Z4YC8e9xGtB2lNEbcq1bvNqkWVxZEV16HK+DoOFqgogwTsTM2z2CrzuZuOb1lpBlX 7Px20UEVGh9nonK5oAcSav9l0nRhd+ugGN62nh2Ehpu1CQguOZ/GT5ZRRY4mEVt8+mKH wjZzzafmj5goTfPSmW8O0OsossY0/+rwHECJwAn4xkiYWbr+S4H0Jp1h2wsJYjS2czDw oGsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="NZ/9T02L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs19-20020a1709072d1300b006cf71e782e1si3370186ejc.89.2022.03.04.05.03.43; Fri, 04 Mar 2022 05:04:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="NZ/9T02L"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238535AbiCDGgV (ORCPT + 99 others); Fri, 4 Mar 2022 01:36:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238473AbiCDGgC (ORCPT ); Fri, 4 Mar 2022 01:36:02 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 289F518CC6A for ; Thu, 3 Mar 2022 22:34:42 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id m11-20020a17090a7f8b00b001beef6143a8so7164250pjl.4 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=PakpS2wXaOP8KUi6h2favJRHiefH+Ew3eUvbLiUmoBcaKcOZ62tpyznODd22yRKWvq hBdH016aRz25YYsKIB8NPv/nkeAc4XFtp6olcjLvHHHHxMNr25PK6+Rs6eT7bsWXUYC0 WcbEBnzoHy/rnaYnijZSOBWVWzjFGv/VGVHfVcp5PpMTf9ZIsVqJXt/M6wwLv8WsBH8q r3qnH4fz6+Qru8eKFF3ZYtDaXbDseGkFeJOu2c7ellEYfvyWZIPFrQZw92xJtNjs42h0 BZ78s6B/aUG8B2v1qRKvvr+REGgFwu5zsp4fL6fEItnRRKIRxZjAU9bjp4yWARo1nukX bzEQ== X-Gm-Message-State: AOAM533pc/7l7VGUPoGioYHXoAokSza2oG9+GEVKJna0NgrlfEca7bK/ AFGlZifXaqy4/m2Xs+i/ovE= 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.33.1