Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp225687iob; Mon, 2 May 2022 17:46:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDRjFXzQGnZ8Ch87ShbbIeumrx9yenec1mbLpZDWGYIN3Lng/QDgA0a2GDZBjYtDqZ/ve+ X-Received: by 2002:a17:903:230f:b0:15e:8bbb:f7b0 with SMTP id d15-20020a170903230f00b0015e8bbbf7b0mr14151385plh.75.1651538816807; Mon, 02 May 2022 17:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651538816; cv=none; d=google.com; s=arc-20160816; b=s958kng/xG44o9LipVXxyELL4Ga7qETSpo5HLeoh+C9ZUczxI7RkgvLlHo2geVrVJC gM9SQhU7XQGJUBXWHTa2B/A8BO4jKUdtmSFFuH69AQcUOYu3AHqCkyue5iX2lB5W5zr4 wUltxKTe+UFfjhiKzOJ2Ixnjqj1wbn4NVvPJf8hjoeLHpiuoBNXRJSRiGBimndEQrSB/ Mxrpj4EBUY1u76KEMspvR+o1PstPMiI5beH7QWIHCRBB20v1isnDpM9t27WqQy09tXrj bEc2+Pm82kPYhn9DOUTVvJX1A0iUr84wuV7AjjOe7cPwnBjNGtw0GqjxUr7ceyUIdGaC jmIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=9R9pDWjRYUdR6pwNJcQ0BhfgQvycoYpQ1Dw84U1v8cI=; b=lHeuqg53PyTwikCtfqVTMJE8Vx+XMnZ4tXnY71Y2vuo+0AaUxrcvT1bA63E1bPJzUz Yxn6SawCohtnHpzleMZwygCN6Wvyy9U+ECxM1qbnY2cG6PAOpPr4MKgcxhRrqCj/uyCN r0FOmRLJrfQ0nG56whEXMEjFR13gZR6r4VSLTUsH5CXP8qoYbL0fFk0hV9VwM+j5Ajsj w39jBoAoy2ZnKRoLZsuablHOGOHTDJ/JLlQhFOLwoAC2LMHTL14ooa7wziaRvaZ6qNFZ qsCwsct/ZQwL0r1Rm6tZPqH2Ay61HT+7iCXFCen/VWhXD3g5ix9BTRRHFQSxTSuxHNJt G+8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=U19vS23L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y20-20020a634954000000b003c1e24ba350si6667740pgk.786.2022.05.02.17.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:46:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=U19vS23L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 5214B3122A; Mon, 2 May 2022 17:35:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379296AbiEBAQx (ORCPT + 99 others); Sun, 1 May 2022 20:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356170AbiEBAQv (ORCPT ); Sun, 1 May 2022 20:16:51 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5388D50469 for ; Sun, 1 May 2022 17:13:24 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id gj17-20020a17090b109100b001d8b390f77bso14884741pjb.1 for ; Sun, 01 May 2022 17:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=9R9pDWjRYUdR6pwNJcQ0BhfgQvycoYpQ1Dw84U1v8cI=; b=U19vS23LukiEuLMoapkp69LTWVJV0KGALWAFdzg7aIINUEMbbSyJlAdt214ftmsJKy b5s4aVb+usOqiuK3gMbsk2r452wCBBmosOWbCJjuui+3coFh1Ydb91n7yBJ0+BWRLyd4 M18KDCgKoO9zPrr+2lEawjACZLTB+fe9UieGxC5S2Orjuc8MLrwE9bYNyQNlcSGDembS qrB+TneqZ5/Cxiy2pEn7hP1mtjnNHPJHgzfUyojjQBxCzYlk6Yzv/7FR9jOQfp2ISqb1 4BcV0yS4cXArzF2s+GSW8f2PJr1EgEVWpeip1hU0w9DMO5wFFcccUFqwZxmV+J0SfZG6 mkJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=9R9pDWjRYUdR6pwNJcQ0BhfgQvycoYpQ1Dw84U1v8cI=; b=7oMlIG5E0LdZlenMAN0bQKzHUN+9Ee4clH1upavg8RaVtT88QiKGvOFFAxUNUTkkZ2 Ze5ITp1yM9Fh3DH32antzjIFe7XCyd/kcBbGGKJmplmKzvKqO8bAxTZQ9aF4Pf7jQfRt 5GXsErj4JHpITNQR+pVOvh0jJ3vgZ8WHYy5GDsRdcmT5y1JEaT/REYhEvMzDi92n8ePj 9BS6J3Cz6osa6kqC6hxQgfSp7zSFRyrAetMyJyP59M6aKam7ELgVHmzJjCzh+qkcEV1m 4VCwXlJM09Dws32lRsiG5ekTJzFtfH7PVG2IwBClu8izkkrBy551cZioRTFTDsTn4HFS 3oPQ== X-Gm-Message-State: AOAM5300vaXRJMemIJgsp/FX485wsP2LTNac/UGOTwjCML41+Nyq5zjc 7aHkf7SdbqIWVMR+3tswcAxUeA== X-Received: by 2002:a17:902:aa46:b0:159:6cb:163 with SMTP id c6-20020a170902aa4600b0015906cb0163mr9152926plr.83.1651450403646; Sun, 01 May 2022 17:13:23 -0700 (PDT) Received: from [2620:15c:29:204:e310:ef81:d548:9992] ([2620:15c:29:204:e310:ef81:d548:9992]) by smtp.gmail.com with ESMTPSA id c5-20020a170902d90500b0015e8d4eb1fasm3384682plz.68.2022.05.01.17.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 May 2022 17:13:23 -0700 (PDT) Date: Sun, 1 May 2022 17:13:22 -0700 (PDT) From: David Rientjes To: andrey.konovalov@linux.dev cc: Andrew Morton , Andrey Konovalov , Christoph Lameter , Pekka Enberg , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , Peter Collingbourne , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: Re: [PATCH 2/2] mm: slab: fix comment for __assume_kmalloc_alignment In-Reply-To: <84d8142747230f2015eaf9705ee7c2e1a9f56596.1651161548.git.andreyknvl@google.com> Message-ID: References: <84d8142747230f2015eaf9705ee7c2e1a9f56596.1651161548.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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,T_SCC_BODY_TEXT_LINE, 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 Thu, 28 Apr 2022, andrey.konovalov@linux.dev wrote: > From: Andrey Konovalov > > The comment next to the __assume_kmalloc_alignment definition is not > precise: kmalloc relies on kmem_cache_alloc, so kmalloc technically returns > pointers aligned to both ARCH_KMALLOC_MINALIGN and ARCH_SLAB_MINALIGN, > not only to ARCH_KMALLOC_MINALIGN. > > (See create_kmalloc_cache()->create_boot_cache()->calculate_alignment() > for SLAB and SLUB and __do_kmalloc_node() for SLOB.) > > Clarify the comment. > > The assumption specified by __assume_kmalloc_alignment is still correct, > although it can be made stronger. I'll leave this to a separate patch. > > Signed-off-by: Andrey Konovalov Acked-by: David Rientjes