[PATCH] mini-os: allow 4096 event channels for 64-bit mini-os

Juergen Gross posted 1 patch 4 years ago
Failed in applying to current master (apply log)
events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] mini-os: allow 4096 event channels for 64-bit mini-os
Posted by Juergen Gross 4 years ago
Limiting the number of event channels to 1024 is fine for 32-bit
builds, but not for 64-bit ones. This might be a problem when using
Xenstore-stubdom as the number of domains which can be supported is
then limited to a little bit more than 1000.

So raise the number of event channels to 4096 in 64-bit builds.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/events.c b/events.c
index 342aead..cdae90f 100644
--- a/events.c
+++ b/events.c
@@ -23,7 +23,7 @@
 #include <mini-os/lib.h>
 #include <xen/xsm/flask_op.h>
 
-#define NR_EVS 1024
+#define NR_EVS EVTCHN_2L_NR_CHANNELS
 
 /* this represents a event handler. Chaining or sharing is not allowed */
 typedef struct _ev_action_t {
-- 
2.16.4


Re: [PATCH] mini-os: allow 4096 event channels for 64-bit mini-os
Posted by Samuel Thibault 4 years ago
Juergen Gross, le jeu. 16 avril 2020 14:27:00 +0200, a ecrit:
> Limiting the number of event channels to 1024 is fine for 32-bit
> builds, but not for 64-bit ones. This might be a problem when using
> Xenstore-stubdom as the number of domains which can be supported is
> then limited to a little bit more than 1000.
> 
> So raise the number of event channels to 4096 in 64-bit builds.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/events.c b/events.c
> index 342aead..cdae90f 100644
> --- a/events.c
> +++ b/events.c
> @@ -23,7 +23,7 @@
>  #include <mini-os/lib.h>
>  #include <xen/xsm/flask_op.h>
>  
> -#define NR_EVS 1024
> +#define NR_EVS EVTCHN_2L_NR_CHANNELS
>  
>  /* this represents a event handler. Chaining or sharing is not allowed */
>  typedef struct _ev_action_t {
> -- 
> 2.16.4
> 

Re: [PATCH] mini-os: allow 4096 event channels for 64-bit mini-os
Posted by Wei Liu 4 years ago
On Thu, Apr 16, 2020 at 02:29:18PM +0200, Samuel Thibault wrote:
> Juergen Gross, le jeu. 16 avril 2020 14:27:00 +0200, a ecrit:
> > Limiting the number of event channels to 1024 is fine for 32-bit
> > builds, but not for 64-bit ones. This might be a problem when using
> > Xenstore-stubdom as the number of domains which can be supported is
> > then limited to a little bit more than 1000.
> > 
> > So raise the number of event channels to 4096 in 64-bit builds.
> > 
> > Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Applied.