bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] libmachdev: Switch machdev_server to multithreaded (rumpdisk


From: Samuel Thibault
Subject: Re: [PATCH] libmachdev: Switch machdev_server to multithreaded (rumpdisk)
Date: Sun, 27 Feb 2022 08:33:19 +0100
User-agent: NeoMutt/20170609 (1.8.3)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]