Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp936349rwe; Fri, 26 Aug 2022 18:52:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR6QbjdDXl3+iDl5a8fuhB0eEsSGa6yiLXQxvC9UK8QmXq/Wgo4XPnyAgnraRsRd9K6WKlXZ X-Received: by 2002:a05:6a00:21c2:b0:52b:ff44:666a with SMTP id t2-20020a056a0021c200b0052bff44666amr6557998pfj.83.1661565171682; Fri, 26 Aug 2022 18:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661565171; cv=none; d=google.com; s=arc-20160816; b=US43xfDtL+WpcnuStKER7SShfNEWTQnBDbkoBKo5726QDmEG99ARisvryPbnSrMwjU 6dVek4YcZOGEy9mIoipM8HTY/gRCQFpc6/FHVUjyOX0LeWY2RaWbbDUYYbqb2pgrDt3+ OCsavNANHHcWCdL/vnPOQxM7Obq3BoxPQNB/IR3RvyNWcJkvkata4HNgn9z75GMJlGwx 9f1ie59IkkZ0yuGd0X2nlOBjL2Fh8PnZVTqJLyQjb5fflcgKThOxQmtcxNgdjiwkiHhw yHft8dB3lhfnMDtEuk2/CrcmL7EQEQ/J/xfm57I36Z34CtGmEbCtxvEJzOpe6Fsdk5V+ C8Cg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=kBcvPZgyrayO3PI98WjaGfa6/lxtb6I7VYsFJkg/49s=; b=bY941f1Q7QoGjbCZ/B3t2BxfcuM/CorXHtCeZK6qavSX9H5OcAg8Gi4IZkwxjbjWQX nw2rOnULt10Tm7tYkcz6wv4nc05xmmKmt0w4MxTHPV2EDgMvJl/+OfiNQ3yKyq/8GUr9 hCEM0eBzyWsXAz8ooadJi4S+y+BoMrD9mCf6+u4vjTOoYguxA+bYwNyqsP8IsW+UMggx KCd/Fq6LN+7bRO/5032fSHwWNhijVGsUZQJHSUOHzwx1RytDCvZokqmqh44H5zaHnjPf rjpMcd3ipS3vYDiVQ+wPe5MF3qgoeEfWM0Cwk+WrK/n452ZXY5gL2P0pY2iG1jcrZRwK wDSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=02pOj+XP; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a170902ea0a00b00163f5028fe7si3300362plg.365.2022.08.26.18.52.41; Fri, 26 Aug 2022 18:52:51 -0700 (PDT) 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=@linux-foundation.org header.s=korg header.b=02pOj+XP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344843AbiH0BgB (ORCPT + 99 others); Fri, 26 Aug 2022 21:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230220AbiH0Bf6 (ORCPT ); Fri, 26 Aug 2022 21:35:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1260DEB56 for ; Fri, 26 Aug 2022 18:35:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 88166B83210 for ; Sat, 27 Aug 2022 01:35:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6984C433D6; Sat, 27 Aug 2022 01:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1661564154; bh=FZdgvl+z5rvlO3Bk3GQBKq4odiPFkU2MmC2I/PED5a0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=02pOj+XPjfuCualHR+jl7BkRv3tY44bOGtpdm8NGc15OcRGIA8Pv8R1kVfJZ6GH6I P07Ui0asihnmZSjSwW1sIoQATNERkZWkRDFupultnyUi03CbKFMRZ5mgvXjDCoLVet +7XNB3B0+FFJXl9X48wzFlpVj6PQw/kAAAM7E0Jw= Date: Fri, 26 Aug 2022 18:35:53 -0700 From: Andrew Morton To: Shakeel Butt Cc: Michal Hocko , Feng Tang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: deduplicate cacheline padding code Message-Id: <20220826183553.4b923552ccddb07f0a78ac8b@linux-foundation.org> In-Reply-To: <20220826230642.566725-1-shakeelb@google.com> References: <20220826230642.566725-1-shakeelb@google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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, 26 Aug 2022 23:06:42 +0000 Shakeel Butt wrote: > There are three users (mmzone.h, memcontrol.h, page_counter.h) using > similar code for forcing cacheline padding between fields of different > structures. Dedup that code. > > ... > > include/linux/cache.h | 13 +++++++++++++ > include/linux/memcontrol.h | 13 ++----------- > include/linux/mmzone.h | 24 +++++------------------- > include/linux/page_counter.h | 13 ++----------- I'm looking for an obvious and reliable way in which those three headers include cache.h. Seems that mm_types.h's inclusion of cache.h should be sufficient. Direct inclusion of cache.h would of course be safest. I guess if it breaks, we'll hear about it ;)