Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4767476rwr; Mon, 8 May 2023 12:20:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xaUs5BhrtCHsMBhJPbF//RUcOpDxevVgBvbrITasvFQBM7F9AupysJfBRBmLTYsCU1Dwd X-Received: by 2002:a05:6a20:8e1b:b0:100:640b:be3c with SMTP id y27-20020a056a208e1b00b00100640bbe3cmr6773810pzj.33.1683573611689; Mon, 08 May 2023 12:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683573611; cv=none; d=google.com; s=arc-20160816; b=jowUqKtfNodmp60aCKQORlmP7tyW5DZ2haWT0kZOwKrhdSI6J8QTkQ7L/OGc7in+DC eZp1ZiDeRjZpmk0MT4Q8C5hPnUOqq1im7zyt2vmRxO8d79t+XibePlZOS0R2UFpTn8gl uSg+iVrHWmHhZAfZLoHEdYCcMYJNGcSiO+pxZ3k3yDAVdw6lHB+Fl1CQZISYuRokgY6q 7WCAA/ehSkylBe3R0Vd663DJo7Yif/3qsrtD1FP/w7PoBaDW3kSP70O4osB/DEyhQb3e WQxN/ec+4sB9+ARMUKfD/epGszgn7ItcuwZkzXjq3zW67LJXxhg3J9MguMJckBSESoTN LoEg== 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=uZkqx7aKUtaW85glkXkWc2KSVWl1+jLzvm0vqmvOK4k=; b=GuT4gxK+Sf3beTb3CzC2TiKQi/eceYlgPMPxodGE71F62cfggOA5sScpdATr7qS/aD /vAc9jyQ6Au74oWjdlu79iK4BAZHqJJ4WGgkn7Hixh6MJyPaFgQf/yJpFZpQm0fElyLF kn9KXmbQ8ySzV04FEj70o+M4VE+y300f0nsgcE3+UvaqE109/DUQfVLF6/rbhejujul4 otDHPXGaRXND5JOyeNqetm1sj+PbyD1oQVOoVHFqIeF2mGrHJLvKxJEWweTH9rbKV11c +0ukmOBaSAKUrIb6UrG0gB+WBqb2sDpJRTN2gnQEMWmS/DtlPPFGfWUpn1rCzqyV+5ze iBzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=oMA1JDBf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a636901000000b005004b2acf6dsi8484993pgc.810.2023.05.08.12.19.59; Mon, 08 May 2023 12:20:11 -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=@tesarici.cz header.s=mail header.b=oMA1JDBf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232991AbjEHS7u (ORCPT + 99 others); Mon, 8 May 2023 14:59:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjEHS7r (ORCPT ); Mon, 8 May 2023 14:59:47 -0400 Received: from bee.tesarici.cz (bee.tesarici.cz [IPv6:2a03:3b40:fe:2d4::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E9F76187; Mon, 8 May 2023 11:59:45 -0700 (PDT) Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id 46D7A15660F; Mon, 8 May 2023 20:59:41 +0200 (CEST) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=none dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tesarici.cz; s=mail; t=1683572382; bh=uZkqx7aKUtaW85glkXkWc2KSVWl1+jLzvm0vqmvOK4k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oMA1JDBfpJw4sW7xwHIesfwzVvuWGRfEibImYMO8MGVZr8iRllWIfuu/0e/mR8S35 iSTkGom3l2vCdobWQ2bfVa6nZe4sueYcQ8TRCacsjjA5CE1u6g+C6TnyFwqEgekR80 QJhrpkc85RcLvfsJty39syGBqRtbVmBD8gRTuYp0lKs/3I0TMuZAwoFEzyxCISt87Q jFclnxrFT242I64DoHaTh7hEShSdJRQAi3f8B9Gi+6bMke4t3VWU3TXk/2b2p3mKb+ ZKQmv+XMh4jxUtnY4XLyIY3pSmPZPhKIaboj506ssLQOCqeMss+Ypkje+lMahARxZd uaDOOK7Oe/wvA== Date: Mon, 8 May 2023 20:59:39 +0200 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Kent Overstreet Cc: Michal Hocko , Suren Baghdasaryan , akpm@linux-foundation.org, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, 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@vger.kernel.org, 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 00/40] Memory allocation profiling Message-ID: <20230508205939.0b5b485c@meshulam.tesarici.cz> In-Reply-To: References: <20230501165450.15352-1-surenb@google.com> <20230508175206.7dc3f87c@meshulam.tesarici.cz> <20230508180913.6a018b21@meshulam.tesarici.cz> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-suse-linux-gnu) MIME-Version: 1.0 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,SPF_HELO_PASS,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 Mon, 8 May 2023 12:28:52 -0400 Kent Overstreet wrote: > On Mon, May 08, 2023 at 06:09:13PM +0200, Petr Tesa=C5=99=C3=ADk wrote: > > Sure, although AFAIK the index does not cover all possible config > > options (so non-x86 arch code is often forgotten). However, that's the > > less important part. > >=20 > > What do you do if you need to hook something that does conflict with an > > existing identifier? =20 >=20 > As already happens in this patchset, rename the other identifier. >=20 > But this is C, we avoid these kinds of conflicts already because the > language has no namespacing This statement is not accurate, but I agree there's not much. Refer to section 6.2.3 of ISO/IEC9899:2018 (Name spaces of identifiers). More importantly, macros also interfere with identifier scoping, e.g. you cannot even have a local variable with the same name as a macro. That's why I dislike macros so much. But since there's no clear policy regarding macros in the kernel, I'm merely showing a downside; it's perfectly fine to write kernel code like this as long as the maintainers agree that the limitation is acceptable and outweighed by the benefits. Petr T > it's going to be a pretty rare situtaion > going forward. Most of the hooking that will be done is done with this > patchset, and there was only one identifier that needed to be renamed. >=20