From: Samuel Thibault <samuel.thibault@gnu.org>
To: Sergey Bugaev <bugaevc@gmail.com>
Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org,
"Flávio Cruz" <flaviocruz@gmail.com>
Subject: Re: [RFC PATCH 6/9] mach: Use PAGE_SIZE
Date: Mon, 20 Feb 2023 00:47:00 +0100 [thread overview]
Message-ID: <20230219234700.bybv7kyettjatw5v@begin> (raw)
In-Reply-To: <20230218203717.373211-7-bugaevc@gmail.com>
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 <bugaevc@gmail.com>
> ---
> 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 <mach.h>
> #include <mach/mig_support.h>
> +#include <mach/vm_param.h>
> #include <unistd.h>
>
> 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.
next prev parent reply other threads:[~2023-02-20 10:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 20:37 [RFC PATCH 0/9] More x86_64-gnu glibc work Sergey Bugaev
2023-02-18 20:37 ` [RFC PATCH 1/9] hurd: Move thread state manipulation into _hurd_tls_new () Sergey Bugaev
2023-02-19 23:32 ` Samuel Thibault
2023-02-18 20:37 ` [RFC PATCH 2/9] hurd: Use proper integer types Sergey Bugaev
2023-02-19 23:33 ` Samuel Thibault
2023-02-18 20:37 ` [RFC PATCH 3/9] hurd: Fix xattr function return type Sergey Bugaev
2023-02-19 23:34 ` Samuel Thibault
2023-02-18 20:37 ` [RFC PATCH 4/9] hurd: Make timer_t pointer-sized Sergey Bugaev
2023-02-19 23:35 ` Samuel Thibault
2023-02-18 20:37 ` [RFC PATCH 5/9] hurd: Simplify init-first.c a bit Sergey Bugaev
2023-02-19 23:45 ` Samuel Thibault
2023-02-18 20:37 ` [RFC PATCH 6/9] mach: Use PAGE_SIZE Sergey Bugaev
2023-02-19 23:47 ` Samuel Thibault [this message]
2023-02-18 20:37 ` [RFC PATCH 7/9] hurd: Generalize init-first.c to support x86_64 Sergey Bugaev
2023-02-20 0:01 ` Samuel Thibault
2023-02-20 16:16 ` Sergey Bugaev
2023-02-20 17:10 ` Sergey Bugaev
2023-02-20 17:31 ` Samuel Thibault
2023-02-20 17:27 ` Noah Goldstein
2023-02-18 20:37 ` [RFC PATCH 8/9 gnumach] Add i386_fsgs_base_state Sergey Bugaev
2023-02-18 20:37 ` [RFC PATCH 9/9] hurd, htl: Add some more x86_64-specific code Sergey Bugaev
2023-02-20 0:30 ` Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230219234700.bybv7kyettjatw5v@begin \
--to=samuel.thibault@gnu.org \
--cc=bug-hurd@gnu.org \
--cc=bugaevc@gmail.com \
--cc=flaviocruz@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).