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 871913846937 for ; Mon, 20 Feb 2023 10:53:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 871913846937 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 1pTtOY-00046i-H0; Sun, 19 Feb 2023 18:47:02 -0500 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=d4chIA1IvrSqc5jfeSp/hz+B+qw6EPRl8OnYQzMZiGE=; b=Tz3qOepFowgRhfZtoeD8 qtehjrEufEsmoN56KjB7Zo11ZcF1+gJN110LXDERK92Ghkd8Te51ggG5bhSDF8zErnl0xY9eR6YUs Sr7vhMmI18+bExR+VqGtmmpY92/Z0f5U/Ua/qlpx5pWO33uBXBrJhFEpzX4kEVK766N9jEDt/SU6+ 4iBSgZefoIzVd2u5DLjnuHKffgqWSGn+joI0JrRvrWnjbexaCukh+hZs66GA02P2zohEizA5zvuZK BrZvgOeMRSa/uS7K9U9dL/BXyCy0ApJytIigm/jlKNjntGj8/yAArctgBRs03IBestLZ8K61cLNSh 2ZcREBvNJBCgnA==; Received: from lfbn-bor-1-1163-184.w92-158.abo.wanadoo.fr ([92.158.138.184] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTtOY-0002sx-40; Sun, 19 Feb 2023 18:47:02 -0500 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pTtOW-0015uh-2X; Mon, 20 Feb 2023 00:47:00 +0100 Date: Mon, 20 Feb 2023 00:47:00 +0100 From: Samuel Thibault To: Sergey Bugaev Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org, =?utf-8?Q?Fl=C3=A1vio?= Cruz Subject: Re: [RFC PATCH 6/9] mach: Use PAGE_SIZE Message-ID: <20230219234700.bybv7kyettjatw5v@begin> Mail-Followup-To: Sergey Bugaev , bug-hurd@gnu.org, libc-alpha@sourceware.org, =?utf-8?Q?Fl=C3=A1vio?= Cruz References: <20230218203717.373211-1-bugaevc@gmail.com> <20230218203717.373211-7-bugaevc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230218203717.373211-7-bugaevc@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Applied, thanks! Sergey Bugaev, le sam. 18 févr. 2023 23:37:14 +0300, a ecrit: > The PAGE_SIZE from the Mach headers statically defines the machine's > page size. There's no need to query it dynamically; furthermore, the > implementation of the vm_statistics () RPC unconditionally fills in > > pagesize = PAGE_SIZE; > > Not doing the extra RPC shaves off 2 RPCs from the start-up of every > process! > > Signed-off-by: Sergey Bugaev > --- > mach/mach_init.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/mach/mach_init.c b/mach/mach_init.c > index a0d9f7f5..42b9cacf 100644 > --- a/mach/mach_init.c > +++ b/mach/mach_init.c > @@ -17,6 +17,7 @@ > > #include > #include > +#include > #include > > mach_port_t __mach_task_self_; > @@ -38,7 +39,10 @@ __mach_init (void) > __mach_host_self_ = (__mach_host_self) (); > __mig_init (0); > > -#ifdef HAVE_HOST_PAGE_SIZE > +#ifdef PAGE_SIZE > + __vm_page_size = PAGE_SIZE; > + (void) err; > +#elif defined (HAVE_HOST_PAGE_SIZE) > if (err = __host_page_size (__mach_host_self (), &__vm_page_size)) > _exit (err); > #else > -- > 2.39.2 > > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.