Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp984064pxb; Fri, 22 Apr 2022 15:58:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMgUYhuaHt1NZ5WYgzxC06y10EfMIf2DtkmEa+fLO+3hkkBhM5WWN/LVwBiP7NW46940SN X-Received: by 2002:a05:6a00:1943:b0:4cb:79c9:fa48 with SMTP id s3-20020a056a00194300b004cb79c9fa48mr7221821pfk.47.1650668331979; Fri, 22 Apr 2022 15:58:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650668331; cv=none; d=google.com; s=arc-20160816; b=Z2N8zXs2yHYt8YE+7D4iHEvH9OJTza0H9YXnaydEQxCZ0jsG38nHUFIQKiFhgK5kD9 NaPe29q4LkMAVejsfrc4ZyZt0Imy5tlOONbTtggCKct1nXLVzOl99yNeps9bOtcwTKzB 1c+UduJj1/4EnfDfupLFugZqKT3VYRAY9QOaz8iG4Pi7izz9Q9Vw1TZ4tA+rT84RcOuw SqyZ1rrYEYwd2JecMoMdph3eqYPFEC7mC1xyRIXDyYjav0MhH9V5gw/v2nwsgWiXM7tz bmdyTcS9MslInpOaNki3ep2OFqqfUhtEJdzmCbdxQVKxZsgadYtZvUThbwO4MWVmjBwh oe1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=oe1v+8HKmPN5xE9lG49dcb7rjaDAxWTXKsNw822YQmM=; b=AHKt2DJ4B0cOgP4IMmZrM/I8hqPnUURlYwBuOqY+x30INn+WjxfFWbC2XVaQaBkHQs A1yaxYhsAnWSG89ojFeJJIBxqRG5LnVrssuP/UI7ynS1cgO8IIJaihmnL7TQGp7tnEjD OVnLPfseuRT2pbrPT/Mlg3m+OnLjA2VaqjiQzg+xZCSWea07gk54N5JzPDip+leqXjCi Fv2tqRcGFOLuEK3M8EJld+T4IaFRMzxjDAYSJKfYI9UtUj7ev7p0joFEzJSZo8V2TSrC LgWuZgU/aBnWDerpRGla5gdsvh8lGCandZYFrPdPJ1Fdjc9iCr/zCnm8TdZi5Rye/WyB KJSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=n5x2XicX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o22-20020a637316000000b003aaf65977fesi363760pgc.726.2022.04.22.15.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:58:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=n5x2XicX; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 91BEB1C2400; Fri, 22 Apr 2022 14:14:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiDVVRp (ORCPT + 99 others); Fri, 22 Apr 2022 17:17:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbiDVVRd (ORCPT ); Fri, 22 Apr 2022 17:17:33 -0400 Received: from mail-vk1-xa30.google.com (mail-vk1-xa30.google.com [IPv6:2607:f8b0:4864:20::a30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0C9387369 for ; Fri, 22 Apr 2022 13:13:07 -0700 (PDT) Received: by mail-vk1-xa30.google.com with SMTP id bi49so4342217vkb.10 for ; Fri, 22 Apr 2022 13:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oe1v+8HKmPN5xE9lG49dcb7rjaDAxWTXKsNw822YQmM=; b=n5x2XicX6wPW74Dksn/JJcGTef6fmb3LZJfmWfIbNW6DANox9qPcP5MqfpuwQlpCDf KoTnuASNxeNpGEBOVFUMkGBeuh4jeVYPYDzN84oEq4VvPT6xIZHiulL2k4kfJ5KT/UUw RtDonsGeZSdT3trKWIsDJsVrHud1ugjNH+esPOLHkaO+4fQ748BaNghTc9SBPi+QZ+O+ 8Cdf5JsCnp5fC2/h2avY6ZdmwpgzaTRq5W8xXWXQhomPayl33tegCZuIw1zaupfoFIGM iQds3OVOa4vEkMuPzPDLe+Y58XOuY+lA6JQ7y5NiDNXMaPu7wD/sFme4jtws1QPJXkxa VyHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oe1v+8HKmPN5xE9lG49dcb7rjaDAxWTXKsNw822YQmM=; b=gaDED0M3frzv9utpaqUPz5fng4VkurxAa0WbIZgJyufBuLH4nnxP/IDthTnsTpvNSt esjdPdheNHaUtIhKXfU0eWcpN56EEf7iiiEARLupERNg3kA/8c1A4gCXtYXuFYGB2iyy hLtBHjKWl09qfxHEkEx1AHj2pUNLLdrdnP6o4IW/HWSNZhPv7gtsPfabIJ5GzqSAnMvd 0ApEFGfzVAmwTK5PL/JZXUOn29tn8Tb+V0w/vN5Zi3yuSPSFJthn0xoidb5Qf2JEDVfr XJKaCVvp0c2Sp85LeFapOpkocmweH8qXbAln+tzTU+fzsB1Ll/FLKbIBPJI2SGIL0vCH 0hFg== X-Gm-Message-State: AOAM531PmnZwJ1OKu3wkxnk/BUfeRANA7n2ZjbQ6qOfnwGQYfxzLPg7+ l/yfmfa8h03Eg3v6cZiKaq0srC5RIVVcBmfxr/EeZQ== X-Received: by 2002:ac5:c899:0:b0:349:33e8:d676 with SMTP id n25-20020ac5c899000000b0034933e8d676mr2382122vkl.0.1650658111910; Fri, 22 Apr 2022 13:08:31 -0700 (PDT) MIME-Version: 1.0 References: <20220421211549.3884453-1-pcc@google.com> In-Reply-To: From: Peter Collingbourne Date: Fri, 22 Apr 2022 13:08:20 -0700 Message-ID: Subject: Re: [PATCH v2] mm: make minimum slab alignment a runtime property To: Catalin Marinas Cc: Andrey Konovalov , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrew Morton , Linux ARM , Linux Memory Management List , Linux Kernel Mailing List , Vlastimil Babka , Pekka Enberg , roman.gushchin@linux.dev, Joonsoo Kim , David Rientjes , Herbert Xu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev , Eric Biederman , Kees Cook Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,USER_IN_DEF_DKIM_WL 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 On Fri, Apr 22, 2022 at 11:03 AM Catalin Marinas wrote: > > On Thu, Apr 21, 2022 at 02:15:48PM -0700, Peter Collingbourne wrote: > > diff --git a/include/linux/slab.h b/include/linux/slab.h > > index 373b3ef99f4e..80e517593372 100644 > > --- a/include/linux/slab.h > > +++ b/include/linux/slab.h > > @@ -201,21 +201,33 @@ void kmem_dump_obj(void *object); > > #endif > > > > /* > > - * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment. > > + * Setting ARCH_SLAB_MIN_MINALIGN in arch headers allows a different alignment. > > * Intended for arches that get misalignment faults even for 64 bit integer > > * aligned buffers. > > */ > > -#ifndef ARCH_SLAB_MINALIGN > > -#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) > > +#ifndef ARCH_SLAB_MIN_MINALIGN > > +#define ARCH_SLAB_MIN_MINALIGN __alignof__(unsigned long long) > > +#endif > > Sorry, only a drive-by comment, I'll look at the arm64 parts next week. > I've seen it mentioned in the first version, what's the point of MIN_MIN > and not just MIN? I tried to explain it here: https://lore.kernel.org/all/CAMn1gO5xHZvFSSsW5sTVaUBN_gS-cYYNMG3PnpgCmh7kk_Zx7Q@mail.gmail.com/ In the end I decided to go back to MIN so this is moot. Peter