Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp454324rdb; Sat, 16 Dec 2023 16:18:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBQmw8hr88QOcydVJRH4yeiFPMwnQbcVPxvDlFMZ3WFhgjK5ZlraVE6Rvxy+IIwrg6P1nN X-Received: by 2002:a2e:93d6:0:b0:2cc:565c:a54f with SMTP id p22-20020a2e93d6000000b002cc565ca54fmr436988ljh.138.1702772316996; Sat, 16 Dec 2023 16:18:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702772316; cv=none; d=google.com; s=arc-20160816; b=Tx/aT06x2ldztKN0y1ThkQWq6CsdQikedaSnbapKnmJ+80hto5HOfCG1dcci1EBjSl Y8WyLfRC2mDcn+EGqOou+21RbSsXNd9mYvgOm2VScDmuUMKj+R4nggqDKTAkkFzE84PQ TETP+aPY79+DNOJ4RZgimJYFmNeshWpggHbmrUSGA8UEl70dqHuQ+h6OUd3jsyaMzmKx +75y9ocszia2BDxTke+rH5/6+U9h7z+CfT5xxsPRnMu/TC4wsNAKq6b7xMD0ExSgurbJ EgFT6OOFRyRd8kVuqauOGjOB0WEnSDP6Ja/BkmqakuhQTtPw++HtR6TUt7lhTAAhVYzq h1XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=C1EyQtZrrzPsJdauHkagM7iwgSK3ui+7wFcf1Ql90yw=; fh=4+AjDjVIL+ukYr7zVmwayoOEYbTW2HytLjdX89wpsiE=; b=Qk5dIkSMiJ/rF9mxkoPP4YP3KaKlke/vojam9ACsg3FeYhk6qC5a8RDlixrxBO7T7g agIdQS1/OsQGJvg+tDjkVhP6vMpRngCk5x32+Q/W62tNmwJKKHOSbiNlxw3SviIbTgDI ODeV8Z9vlvYH8u4qvKNxn+6bysKmBT5/EBPDVPNAJNip8iaQfwFL69RLm3pBDQPgb/tn 7JvTeg8sMaDa0gvddAw0uK7YQ8DAHn/27j77OpEAf3dbmLQkWu5k06vZxx4biSRufUGQ 61UD5ktWnzuIzBgUMDLZtmzpigzZi+CldoeVaSDtQuGdI0Pjo/X79C2pJo5Krq73Gq9l 5kqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fY+v1Yom; spf=pass (google.com: domain of linux-kernel+bounces-2413-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2413-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f17-20020a0564021e9100b0054c923c76bdsi8667937edf.302.2023.12.16.16.18.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 16:18:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2413-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fY+v1Yom; spf=pass (google.com: domain of linux-kernel+bounces-2413-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2413-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B84501F229D4 for ; Sun, 17 Dec 2023 00:18:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED5597FA; Sun, 17 Dec 2023 00:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="fY+v1Yom" X-Original-To: linux-kernel@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B35A366; Sun, 17 Dec 2023 00:18:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=C1EyQtZrrzPsJdauHkagM7iwgSK3ui+7wFcf1Ql90yw=; b=fY+v1YomSygsPdBd8Jdm4EwZ4/ Lo4ivfpOIdBieru9I2UKeMqgnxit8adT9+svb5ezPg/AkiCap0GNLwwnbbjx+lR6eXu++pYnmje2q OD5ac1zLfstFh58JX4h8u+wEjtz0VhEFXwKkfLgF7kaPPrCLQz2/hysUdcgP+EIn8YzJBW86rF9fM BXxJirnSvV4In+xhJcoomQQp1QRx4W97rs/jiH4UW2z0yY35d2/XrAz2a47f7a11iSs+ppnRiqE1f Km/XvzJZ01AWHw06hze7HJHb94HCR+nW60P+B57YKqkI2lcmwQfDeOkccQGxJGAacO5fMA+uzefNc OgkuZJjw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rEerJ-00BIOX-Vj; Sun, 17 Dec 2023 00:18:18 +0000 Date: Sun, 17 Dec 2023 00:18:17 +0000 From: Matthew Wilcox To: Randy Dunlap Cc: Kent Overstreet , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, tglx@linutronix.de, x86@kernel.org, tj@kernel.org, peterz@infradead.org, mathieu.desnoyers@efficios.com, paulmck@kernel.org, keescook@chromium.org, dave.hansen@linux.intel.com, mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, brauner@kernel.org Subject: Re: [PATCH 46/50] preempt.h: Kill dependency on list.h Message-ID: References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-1-kent.overstreet@linux.dev> <20231216033552.3553579-3-kent.overstreet@linux.dev> <20231216223522.s4skrclervsskx32@moria.home.lan> <82ed43c2-2a9d-4c5e-8ccd-8078397b7953@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82ed43c2-2a9d-4c5e-8ccd-8078397b7953@infradead.org> On Sat, Dec 16, 2023 at 04:04:43PM -0800, Randy Dunlap wrote: > > > On 12/16/23 14:35, Kent Overstreet wrote: > > On Sat, Dec 16, 2023 at 06:13:41AM +0000, Matthew Wilcox wrote: > >> On Fri, Dec 15, 2023 at 10:35:47PM -0500, Kent Overstreet wrote: > >>> - INIT_HLIST_NODE(¬ifier->link); > >>> + /* INIT_HLIST_NODE() open coded, to avoid dependency on list.h */ > >>> + notifier->link.next = NULL; > >>> + notifier->link.pprev = NULL; > >> > >> Arguably INIT_HLIST_NODE() belongs in types.h -- we already have > >> RCUREF_INIT() and ATOMIC_INIT() in there. > > > > I think I'd prefer to keep types.h as minimal as possible - as soon as > > we start putting non type stuff in there people won't know what the > > distinction is and it'll grow. > > > > preempt.h is a bit unusual too, normally we'd just split out a _types.h > > header there but it's not so easy to split up usefully. > > > > I don't feel like I have NAK power, but if I did, I would NAK > open coding of INIT_HLIST_HEAD() or anything like it. > I would expect some $maintainer to do likewise, but I could be > surprised. There is another solution here (although I prefer moving INIT_HLIST_HEAD into types.h). The preprocessor allows redefinitions as long as the two definitions match exactly. So you can copy INIT_HLIST_HEAD into preempt.h and if the definition ever changes, we'll notice.