From mboxrd@z Thu Jan 1 00:00:00 1970 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 72059C001DD for ; Mon, 3 Jul 2023 18:39:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 003A028002C; Mon, 3 Jul 2023 14:39:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ECF41280001; Mon, 3 Jul 2023 14:39:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D6FF928002C; Mon, 3 Jul 2023 14:39:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C24D0280001 for ; Mon, 3 Jul 2023 14:39:03 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 96AFC1402DB for ; Mon, 3 Jul 2023 18:39:03 +0000 (UTC) X-FDA: 80971162566.28.DCCAFBB Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by imf21.hostedemail.com (Postfix) with ESMTP id BABA71C001D for ; Mon, 3 Jul 2023 18:39:01 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=TjYUycTB; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf21.hostedemail.com: domain of keescook@chromium.org designates 209.85.160.41 as permitted sender) smtp.mailfrom=keescook@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688409541; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sQGLILnEm5o54v5mjoZuL1G4hwG+jcIWjoHZArQ7sfk=; b=QNGgSAkNTwZrqkT6OMiQ2oIkrjkKOFkw8M+hadqExxb7EBafwWa+H83zasRDOSflicPAdI i4dMx8wVGQk3nIyNvRJ4Koe0LgoqhbiiazY5RdM1FbCJS3LEt4/eBy8yeqjzcKxc7lbMx0 sjWGebJGuCMe2ndE8obe4z1mOMfbSzg= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=TjYUycTB; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf21.hostedemail.com: domain of keescook@chromium.org designates 209.85.160.41 as permitted sender) smtp.mailfrom=keescook@chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688409541; a=rsa-sha256; cv=none; b=SUysVlBqDwJPqWmOoMP6h4rdd740WgRRaP3MRgNUnwr4lZN0J+UqCvyy2S/t2kF9TN5Cp+ 4ExornsRjuP35Hgc/DU13SLTiZdxzRckgoyM2ge+jvqlfkGTnn1HOCvCwvoOTHWag2om5O Ax4LI5CyvhCDfbnJO9cBCS+TGQA6ezw= Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-1b05d63080cso4884231fac.2 for ; Mon, 03 Jul 2023 11:39:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688409541; x=1691001541; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=sQGLILnEm5o54v5mjoZuL1G4hwG+jcIWjoHZArQ7sfk=; b=TjYUycTB4yuvx5ehjMW5FUH2ojidBdmp5i/WiVqXu+7LfXtLH9WYMJfpxHuBo3pWMD WY6uw+rpIJyWJqXuqv5pPjrgnMvsxBc8QD/twEyWAKNCSJsEHh27WAqC6ireChp6/cxz 8AaKaWKpyMjoWxbAXuDtkYLDH6Quef8XphzXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688409541; x=1691001541; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sQGLILnEm5o54v5mjoZuL1G4hwG+jcIWjoHZArQ7sfk=; b=TYQYtaylp8twka2stNCRmHR1WJ8rhfMg2K7aS2kHXZKnh/fHN7HMjOR4JELaY5ZWYP XvtooubKb+jM1cNKIHGy5Rolu+85I+dDlb6jxJCoGeNz7TyxjCoLchjnul6hVhDgwyZe QbvQ5g0dB9kFGlWlePPks0WUaFwcisN2K5v+NSx3YXm+0ATPtqO0MNlEujEIuJUxAsHB h/WpT1mnbheJnxvfv92hRjk64XgvJqfqqTgGcUTYaptirMBgqMAIpnSQ3Ijd0Hs7riKJ 75zWcBm1Xv7IPQivSxCJ10oVpE8iIr6Ufx1VMM8bIRYlkP6QXt93DZxYDuBxf5OGKkg2 TaJg== X-Gm-Message-State: ABy/qLZEnf/e+REyzAp+z/bfi3D4rmVdXskjDmNfLyqfCp08lgQUZPq5 3wh42o5EdM3ob88vGrkut5vamw== X-Google-Smtp-Source: APBJJlGzQQ+aH4qGk5swZiGJO2jJp4bAEzIR9cOZM+LgHCchTn/+W51ZdhmJ8ULaSS4QVRHPIt49OQ== X-Received: by 2002:a05:6870:ac0c:b0:1b0:6e5b:21d6 with SMTP id kw12-20020a056870ac0c00b001b06e5b21d6mr14898753oab.38.1688409540823; Mon, 03 Jul 2023 11:39:00 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id m17-20020a17090ade1100b00263987a50fcsm4614022pjv.22.2023.07.03.11.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 11:39:00 -0700 (PDT) Date: Mon, 3 Jul 2023 11:38:59 -0700 From: Kees Cook To: Julian Pidancet Cc: David Rientjes , Christoph Lameter , "Lameter, Christopher" , Pekka Enberg , Joonsoo Kim , Andrew Morton , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , Rafael Aquini Subject: Re: [PATCH v2] mm/slub: disable slab merging in the default configuration Message-ID: <202307031137.87508EB@keescook> References: <20230629221910.359711-1-julian.pidancet@oracle.com> <38083ed2-333b-e245-44e4-2f355e4f9249@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: BABA71C001D X-Stat-Signature: e4at53tx78wq8jaz55s6u3ary54ciueg X-Rspam-User: X-HE-Tag: 1688409541-693748 X-HE-Meta: U2FsdGVkX1+jbP1s/wny0uLRmT+gUsXGOGb1aojzp2uwkCkT8dKH6IuV2jXiRJw+jHXRWAteBGrRE+CloCPqfYVaL/b/faPwHHCO6qcwg3tiRBOgOxHMg/n8XpaRAhSJ9hQkvPqat6TJOJgGFDNP4FAeNUW1GqrFiADQ0O2iYwbOjnb/tDlGEKk967iSs9vZS7bjt/Z10J9pwcjd7HgWJtQkCpYwi8adxDT+SfROjJyCF/GHO7MudytelZIJmWun6P4WN1OsVWFaGCk6a3b9zlpODm09UzCBnX91lJ5VwtvcYeV5F6t0kILgCrRXrjE5e3tTgv56Kkl/ksMQKGDCsJ0AEDw1X+JwuQlTbDJRxlfFGjB6W5U22YvL3kJfEOX4wkprEa+Iiu+d9IWl1CZKXV026NcV6DszujeYmmOBJatsRw2KqKFbkrFErW7Yed9v91mee9W8LZ1BOwtHKjQO9DDGXapY+UKStr5F75tKSaA8Tavzlt2x3fCUFTPkv4bd+n0IBHE2AHdEuDxVhrNbPYrHBLONczscW2iiBd6TOQ1Zctyn8n6HMMgz315rYV47VtWfzKXUCkLyhHzmF8LESMyhxwmG7HWNjtJq2svA9Qb8pVOx5hFaCBWTYRxCjshPCCs710/dlO4YH4cI0OBx5mGwKmQMBr1JxX+My9GPRQhFSIlQo2qB4YvXXFA+r1OCfmikTapj8uTxpyETdEDvmPZnp3b1pnpOIiBNYWG1jol1mRoA5HR5DAv3WFNXfxgljl4qy86Q4P2Hkab4rU5rzwxuysTQWiv6z+PjQ8Ea8uSW1FLUH0sv45XcHIOMLFlZbLYd+g3smKZWywCLwfLqYuOpP5Zxohi1EUGg/MIwrk/O93dmWxOma/rCDHlBUIf1EpHKFwVFPkxq0VnYKRtOQ5Cg1SUvKsRGsvwFQ+uoqLeu1Jiz0+WWWlOqwqvyW04vnYFDJaulCokKu1tQS2t rRWQYScH eNPvu7wxG7lWeDT2T+asITgtPCVdCHzIi9CzPLt5xnWTJ7zO95JO+YOZAsaiMkqSxeoUe4jHLgm7K8bX/dxKG7FeiO2Jh1qnEZWJvoj6OiQQkvPc07zcLXitQg7PxYTExqvIL8k3rCwIrHTOGwqOLLgPrcQROWL8RnwOVOcV4yPerU6rFXtwdd6Vf8slfixtcFyJXKRKq/5Btnlxfhb98GNDlxFd65AGqeNxmfaua8nWCXGxFipKmHrxyqvDt4bsuiSbJHBWQWtfy0amrSEpHNVoOnVrNW3qyKYIfTwWPGg2Q23EvU5MIsq9G8qNHsQHifXWlZORSfYmhUsZspMH60z2WijNUCn6Wt/Iz1j2qr58iKsDTtG5W5wda8tNhHaqLnuy0EpZHnsPVZ2DEUg4glYegQdRby1VQ8OKZkVAR0e5T37s= 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: On Mon, Jul 03, 2023 at 12:33:25PM +0200, Julian Pidancet wrote: > On Mon Jul 3, 2023 at 02:09, David Rientjes wrote: > > I think we need more data beyond just kernbench. Christoph's point about > > different page sizes is interesting. In the above results, I don't know > > the page orders for the various slab caches that this workload will > > stress. I think the memory overhead data may be different depending on > > how slab_max_order is being used, if at all. > > > > We should be able to run this through a variety of different benchmarks > > and measure peak slab usage at the same time for due diligence. I support > > the change in the default, I would just prefer to know what the > > implications of it is. > > > > Is it possible to collect data for other microbenchmarks and real-world > > workloads? And perhaps also with different page sizes where this will > > impact memory overhead more? I can help running more workloads once we > > have the next set of data. > > > > David, > > I agree about the need to perform those tests on hardware using larger > pages. I will collect data if I have the chance to get my hands on one > of these systems. > > Do you have specific tests or workload in mind ? Compiling the kernel > with files sitting on an XFS partition is not exhaustive but it is the > only test I could think of that is both easy to set up and can be > reproduced while keeping external interferences as little as possible. I think it is a sufficiently complicated heap allocation workload (and real-world). I'd prefer we get this change landed in -next after -rc1 so we can see if there are any regressions reported by the 0day and other CI performance tests. -Kees -- Kees Cook