[Top][All Lists]

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

Re: [PATCH hurd] libpager: use a fixed number of threads

From: Samuel Thibault
Subject: Re: [PATCH hurd] libpager: use a fixed number of threads
Date: Sun, 2 Nov 2014 13:52:16 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)


I'm thrilled by the potential of this change :D

AIUI, this does work because you had previously separated disk and file

Justus Winter, le Tue 28 Oct 2014 01:37:44 +0100, a écrit :
> +/* Start the worker threads libpager uses to service requests.  */
> +error_t
> +pager_start_workers (struct port_bucket *pager_bucket)

I'd say the caller would probably like to choose the number of workers
here, but that can be patched later.

> +#define STACK_SIZE (64 * 1024)
> +  pthread_attr_setstacksize (&attr, STACK_SIZE);
> +#undef STACK_SIZE

I'd say the caller should be able to choose the stack size: he knows
what size the server functions will need.  Also, now we don't actually
need small stacks since we don't have many threads.  So for now remove
this to just use the default stack size, and we can patch it later if
some server actually needs more than that (and I doubt it).

> +#ifdef MACH_RCV_LARGE
> +  const mach_msg_size_t max_size = 2 * __vm_page_size; /* Generic.  Good? 
> XXX */
> +#else
> +  const mach_msg_size_t max_size = 4 * __vm_page_size; /* XXX */
> +#endif

Actually, no, the max send size is 2048, as hidden in the mig source
code. Use that value and refer to mig.

> +      /* What follows is basically the second part of
> +      mach_msg_server_timeout.  */

So you need to copy the copyright years :)

With these three last fixes, please push! :D


reply via email to

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