Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp951633rdh; Thu, 26 Oct 2023 23:35:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbIJ5s9lY6ee8rVjNGs3UyM1Ztf0vfGBDu+RAy28fBxGAk1j8se5PIc7TLzq+JXwI0TTCX X-Received: by 2002:a25:cb05:0:b0:da0:6933:d8d with SMTP id b5-20020a25cb05000000b00da069330d8dmr1805783ybg.63.1698388536732; Thu, 26 Oct 2023 23:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698388536; cv=none; d=google.com; s=arc-20160816; b=HvTlTtGWiY2ZFVn6mvjBcueI1Vkpd8QcoUssHUghv0wmLwaFt+o3OQYi2rmuV3CNe1 iSTLOKgI09OBfdKi/Cnv7VZ5ve8hO4XvczGPk8yoxBPxwbyfAICcIrdXl7RBbpHbrOXN adWqXN92n6C2O16g1b+X/1lUIBhlf1BM3slldzoHFRKoDooEDjJFYbzZmKdZo6eXHH8c yipm2tD9eXtzCJIQ+WQjXTTAMsVErPJH1n0RbtPcebyT2NwvyqzdSNsPXts9yBroST3K LFf/+neRgSPrLbsBnalnAzUgvgBnU/PImYz/SSeHcRaEdH98uZfLPdnDNiHl0i7ym5b9 8Tww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=ijn9LKOmAMUGBGwJHsN1qvv5KR6XAd5/U4/K/UeLB/A=; fh=uWZzO5qpQEQcsf25sMR9iCX0G8RZ+AMlAp30gdARf6w=; b=HNWaE3d2aavT9NlXeZfJ1ogfBPweSFTYTvWr2aBJL1AB4TacHfv1EaCpCnNVBHqJSx U9VIw0um0ZpPWSSeLm8mBtPAu81a5IssNWF7zr1IN/XX1OCk53hJO/IYesN1flRIc4Nx djd25QgG60F540Pqj3ijWni/L/UJ8JB1uL0sAGIQqayezSXPJbRl67ijjRTf9bgE08P4 5tWtAQKkwuQet1/fdHNUoWAdHe4SucmtmNkmERnlp6lNv/rcLWRsgXTND1wB2RhfEi3U 4Z0xcLFqPvu0QyyUClADrLIx7MrorJRfU/SsGN04QqaT2S827A+iMoZMmQsH5DqKPKgq Kovw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=HPKdp0vu; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="DiBX4/I2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v127-20020a254885000000b00da0a8d94df2si1576657yba.19.2023.10.26.23.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 23:35:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=HPKdp0vu; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="DiBX4/I2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 751F9828613A; Thu, 26 Oct 2023 23:35:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345244AbjJ0Gfc (ORCPT + 99 others); Fri, 27 Oct 2023 02:35:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbjJ0Gfb (ORCPT ); Fri, 27 Oct 2023 02:35:31 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35570121; Thu, 26 Oct 2023 23:35:29 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8216B3200BB7; Fri, 27 Oct 2023 02:35:26 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Fri, 27 Oct 2023 02:35:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698388526; x=1698474926; bh=ijn9LKOmAMUGBGwJHsN1qvv5KR6XAd5/U4/ K/UeLB/A=; b=HPKdp0vu6TQo9nOWnMSMnIsbdPaZo/7QxPk1qO5P7/ePiud9XNC skjx9DUvtpBsAd0Ih/52W5KSD4URW9BYr+TAOXUl88vhxZubblKMBVK2mLWWfwxc HpsyOeriLtbdSnNA7T8seXSUHpDI8FZny9u5QRzPWUJ8yNsoKlKD9C7uSIz3x1Vl Usj7X9E+jKDiMVxrUdBoxts2Id7TrfennhJghV5WdENLEqCxk4+bAHDi1tTzbJsZ 0nH9AktgGqkSWK+QWJUx5vezWn3uGrniIuxSS0t9up1l8Xf+qQYG5yuwr6vdbkO6 qRWnD+Zi524JBvNB+FbcLjqq+kJVs3PbvOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698388526; x=1698474926; bh=ijn9LKOmAMUGBGwJHsN1qvv5KR6XAd5/U4/ K/UeLB/A=; b=DiBX4/I27Pvac9t3zmkmnSuXducX4QdxI55QsQfLCc0oUP94wqU S4N1jNnKzpLFqwEDSflmoanuUwm8qhoteciYVEM5uCcoOl2FE8cUza2uyti3r23U KRGZzdVDZ3rLhfb7FaFUi2qpSSRAdprbjhvbQ2SGGmNCWBABnwSWAskDkG4Unlr3 cd1Le2H8YMJtotYKOQ0brC2U8kSZbUdN6pHecluADE8TCJAhydBJL0Lq4L4WLJpl Y5lDYak4Q2Gm/4+20+3UZ3WJrCcjUB3aoTpdVIRqgOFXeRBIucijI4jsgzoBKapG 7DeMt420YltBYeydd36vxVQN1rvCntZPodw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleefgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id F0DD6B60089; Fri, 27 Oct 2023 02:35:24 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1048-g9229b632c5-fm-20231019.001-g9229b632 MIME-Version: 1.0 Message-Id: In-Reply-To: <20231026235433.yuvxf7opxg74ncmd@moria.home.lan> References: <20231024134637.3120277-1-surenb@google.com> <20231024134637.3120277-29-surenb@google.com> <87h6me620j.ffs@tglx> <87jzr93rxv.ffs@tglx> <20231026235433.yuvxf7opxg74ncmd@moria.home.lan> Date: Fri, 27 Oct 2023 08:35:03 +0200 From: "Arnd Bergmann" To: "Kent Overstreet" , "Thomas Gleixner" Cc: "Suren Baghdasaryan" , "Andrew Morton" , "Michal Hocko" , "Vlastimil Babka" , "Johannes Weiner" , "Roman Gushchin" , "Mel Gorman" , "Davidlohr Bueso" , "Matthew Wilcox" , "Liam R. Howlett" , "Jonathan Corbet" , void@manifault.com, "Peter Zijlstra" , juri.lelli@redhat.com, ldufour@linux.ibm.com, "Catalin Marinas" , "Will Deacon" , "Ingo Molnar" , "Dave Hansen" , x86@kernel.org, peterx@redhat.com, "David Hildenbrand" , "Jens Axboe" , "Luis Chamberlain" , "Masahiro Yamada" , "Nathan Chancellor" , dennis@kernel.org, "Tejun Heo" , "Muchun Song" , "Mike Rapoport" , "Paul E. McKenney" , pasha.tatashin@soleen.com, yosryahmed@google.com, "Yu Zhao" , "David Howells" , "Hugh Dickins" , "Andrey Konovalov" , "Kees Cook" , "Nick Desaulniers" , vvvvvv@google.com, "Greg Kroah-Hartman" , "Eric Biggers" , ytcoode@gmail.com, "Vincent Guittot" , dietmar.eggemann@arm.com, "Steven Rostedt" , bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, "Christoph Lameter" , "Pekka Enberg" , "Joonsoo Kim" , "Hyeonggon Yoo" <42.hyeyoo@gmail.com>, "Alexander Potapenko" , "Marco Elver" , "Dmitry Vyukov" , "Shakeel Butt" , "Muchun Song" , "Jason Baron" , "David Rientjes" , minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Linux-Arch , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH v2 28/39] timekeeping: Fix a circular include dependency Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 23:35:35 -0700 (PDT) On Fri, Oct 27, 2023, at 01:54, Kent Overstreet wrote: > On Fri, Oct 27, 2023 at 01:05:48AM +0200, Thomas Gleixner wrote: >> On Thu, Oct 26 2023 at 18:33, Suren Baghdasaryan wrote: >> > On Wed, Oct 25, 2023 at 5:33=E2=80=AFPM Thomas Gleixner wrote: >> >> > This avoids a circular header dependency in an upcoming patch by= only >> >> > making hrtimer.h depend on percpu-defs.h >> >> >> >> What's the actual dependency problem? >> > >> > Sorry for the delay. >> > When we instrument per-cpu allocations in [1] we need to include >> > sched.h in percpu.h to be able to use alloc_tag_save(). sched.h >>=20 >> Including sched.h in percpu.h is fundamentally wrong as sched.h is the >> initial place of all header recursions. >>=20 >> There is a reason why a lot of funtionalitiy has been split out of >> sched.h into seperate headers over time in order to avoid that. > > Yeah, it's definitely unfortunate. The issue here is that > alloc_tag_save() needs task_struct - we have to pull that in for > alloc_tag_save() to be inline, which we really want. > > What if we moved task_struct to its own dedicated header? That might be > good to do anyways... Yes, I agree that is the best way to handle it. I've prototyped a more thorough header cleanup with good results (much improved build speed) in the past, and most of the work to get there is to seperate out structures like task_struct, mm_struct, net_device, etc into headers that only depend on the embedded structure definitions without needing all the inline functions associated with them. Arnd