[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: [PATCH] libmachdev: Switch machdev_server to multithreaded (rumpdisk)
From:       Samuel Thibault <samuel.thibault () gnu ! org>
Date:       2022-02-27 7:33:19
Message-ID: 20220227073319.qbftgr4zacsu5enk () begin
[Download RAW message or body]

Damien Zammit, le dim. 27 févr. 2022 07:17:10 +0000, a ecrit:
> TESTED via booting a rump disk

Errr, we can't just change libmachdev like that, there are several users
of it which may not be threadsafe at all. Rather export the demuxer
function and let users call ports_manage_port_operations_multithread
themselves.

> ---
>  libmachdev/ds_routines.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c
> index 139551f6..6c150c8f 100644
> --- a/libmachdev/ds_routines.c
> +++ b/libmachdev/ds_routines.c
> @@ -351,7 +351,11 @@ void * machdev_server(void *arg)
>    /* Launch.  */
>    do
>      {
> -      ports_manage_port_operations_one_thread (machdev_device_bucket, demuxer, 0);
> +      ports_manage_port_operations_multithread (machdev_device_bucket,
> +						demuxer,
> +						1000 * 60 * 2, /* two minutes thread */
> +						1000 * 60 * 10,/* ten minutes server */
> +						0);
>      } while (1);
> 
>    return NULL;
> --
> 2.35.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic