From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id C6A953858D32 for ; Mon, 24 Apr 2023 21:25:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6A953858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3h5-0005Tl-GH; Mon, 24 Apr 2023 17:25:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=7psSGwBuxBylYP0eE+VaOToK2MU5OTKgQ0pFGc7V83A=; b=pufKAuFYJxrhh3jy3CsU GSfMeXwCSO/tEJJHo6d0VVYFwk1KS1pDlXfC9GdJR1bD7HSdxaymcENm/ToLkMGp9KIIzA+AFFDrp XcN8DGpRotxVgWEdSUwkRlkJml4wg6GfJHtohxbg6jrrnGDA1Uk/rQcENDRn7QyuStK9iiXiiOmqk Agj2/oqdHHhLDZl7/jXzHEMQ0KG5F7gKmyGOy1svg70+4P88s3J9nYFwJAEvWHvhgIQf4NFsYt67d /1OTnSrtZO2uHnzfg/Ur2Jk0Hw5XiiQRcMSDieeII+LZ/yy52X6PXNDAn0aCRt52lJ9NLKaGLxwTj c1hJMpWHIG1/yA==; Received: from [2a01:cb19:4a:a400:de41:a9ff:fe47:ec49] (helo=begin.home) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3h4-00037O-Mu; Mon, 24 Apr 2023 17:25:54 -0400 Received: from samy by begin.home with local (Exim 4.96) (envelope-from ) id 1pr3h2-0044Zb-1M; Mon, 24 Apr 2023 23:25:52 +0200 Date: Mon, 24 Apr 2023 23:25:52 +0200 From: Samuel Thibault To: Sergey Bugaev Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: Re: [PATCH 3/4] hurd: Microoptimize mmap () Message-ID: <20230424212552.yticdmmbgxknh2as@begin> Mail-Followup-To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20230423215526.346009-1-bugaevc@gmail.com> <20230423215526.346009-3-bugaevc@gmail.com> <20230424204644.omudvkhihy3nzj7m@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP,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 server2.sourceware.org List-Id: Sergey Bugaev, le mar. 25 avril 2023 00:09:58 +0300, a ecrit: > What I should rather look into is marking __hurd_fail and friends with > __attribute__((cold)); that would take care of all the error branches > everywhere automatically without having to mark things up. Yes, that'd probably be great :) > But I did a quick grep and found nothing using __attribute__((cold)) > yet, so I don't know what the right way of using it would be > (and maybe it's not being used intentionally?). It's probably that just nobody thought about adding it. > I'm thinking it should probably go into misc/sys/cdefs.h as __COLD (or > __attribute_cold?). Something like this: > > #if __glibc_has_attribute (cold) > #define __COLD __attribute__ ((cold)) > #else > #define __COLD > #endif > > What do you think? Yes! Though you can even make it #if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__cold__) Samuel