Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp454873rdb; Sat, 16 Dec 2023 16:20:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvcT1RRtL/cHE2rkDuP5vH7Mr8jQ9FjVRx0yqA1oQBhaTrI1MiUeCDZ56EkvxI73snu2KH X-Received: by 2002:a62:e113:0:b0:6d5:3912:d5ce with SMTP id q19-20020a62e113000000b006d53912d5cemr632902pfh.6.1702772444529; Sat, 16 Dec 2023 16:20:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702772444; cv=none; d=google.com; s=arc-20160816; b=mD/0HWy8l3Sj9OX4dUsxE6pLcOhZ70v51ALBz7VphD6zSlbDP+Z9fAYCbIZpAh/MJi J7MvAQ1+A/AG4R99FLAtndWQRSakzHigmJmKRj3ZyecD3LX0EunM+703y9VSoGWHGP82 MtCBgVwfi1zWJ8TLUMzaPX8e/0gJoMT/65LLLFqsCdYUtxymPHf6RAGc2hnnC5fEb1xd tEukVbqbB51cVFjdqgTajedZXHkHaQjAr+Zenhe4hPAcPj67aOyqqeiP8HXNnAoxRCKV hbkCQKK3r+bdUlwN6QuMPX3xzpnq9D1IU8n4R7qcS8GE5Y0JfMv9+cmqVUEeoc5b4P4/ jtQQ== 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:dkim-signature:date; bh=GwR937qpDoZqrlCJRYeBs8v4+5rmEpvwdjbzX+VHs9A=; fh=xDN2cXyBklBDSKFhLACBYefM5aQ2ScLzqH5QHXtZO8o=; b=HUv6oWP7yUdgjRdl07hiGdPpjuVvkk/w+BBdJjt5rEOq4k9brJNtfQ4EThEuUxp9D6 cDBk6VG5w/9CTWgTdVcGOQRjfdWJ9UYoH/L5Zzs5AkGGM/Ro2mKKO1qp2tp5PRChRgfQ seG3+YBIP+2+B8/rsPehIWHEQVVsqjCwZhzbgJ2KsgDNFhrj09XsIXGjtsUQXb2CJyUG j5ZNw7OrC5SDGg9Q9imJiGVOTV+HDrrFJSXjrdsoclqF5v13RJR3oEjEOdlg7cEyC/6Y G2EtbeN7Lz2tQDh+066c6EjMzj1/z4l2tOOM5bNjUEcG8dWJQ1ZZq0YiwDlLO4IEpInA DTLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rBxTo1zm; spf=pass (google.com: domain of linux-kernel+bounces-2415-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2415-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fb30-20020a056a002d9e00b006ce52bb999fsi15282961pfb.273.2023.12.16.16.20.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 16:20:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2415-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rBxTo1zm; spf=pass (google.com: domain of linux-kernel+bounces-2415-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2415-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C7347282350 for ; Sun, 17 Dec 2023 00:20:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F5BCA32; Sun, 17 Dec 2023 00:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="rBxTo1zm" X-Original-To: linux-kernel@vger.kernel.org Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) (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 E5F81366 for ; Sun, 17 Dec 2023 00:20:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Sat, 16 Dec 2023 19:20:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1702772432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GwR937qpDoZqrlCJRYeBs8v4+5rmEpvwdjbzX+VHs9A=; b=rBxTo1zmPfHj3/6AVJZywQWcFReUJaxEC22ptYEKo/K/hf+g+YVJIHgDvHbTEweZ86kAKh gAIBEb/5TWtiu2pd3VF4HiEc60ZhPfa2HNJfnXAZGJZRwgX17s8aZMb+0qkmprB5IUuxdV rcgv+auqQORTEcZg+YG1cyyB5OAZXv0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Matthew Wilcox Cc: Randy Dunlap , 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: <20231217002028.shjg6p7wa2cmtkq2@moria.home.lan> 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: X-Migadu-Flow: FLOW_OUT On Sun, Dec 17, 2023 at 12:18:17AM +0000, Matthew Wilcox wrote: > 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. I like it.