[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 1/7] xen: introduce gnttab_max_nr_maptrack_frames command line option
Introduce a new Xen command line option to specify the max number of maptrack frames per domain. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> --- docs/misc/xen-command-line.markdown | 6 ++++++ xen/common/grant_table.c | 11 +++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index 389701a..acf6208 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -613,6 +613,12 @@ Specify the serial parameters for the GDB stub. Specify the maximum number of frames per grant table operation. +### gnttab\_max\_nr\_maptrack\_frames +> `= <integer>` + +Specify the maximum number of maptrack frames domain. +The default value is 8 times gnttab_max_nr_frames. + ### guest\_loglvl > `= <level>[/<rate-limited level>]` where level is `none | error | warning | > info | debug | all` diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 23266c3..5451c75 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -102,10 +102,9 @@ nr_maptrack_frames(struct grant_table *t) return t->maptrack_limit / MAPTRACK_PER_PAGE; } -static unsigned inline int max_nr_maptrack_frames(void) -{ - return (max_nr_grant_frames * MAX_MAPTRACK_TO_GRANTS_RATIO); -} +static unsigned int max_nr_maptrack_frames = DEFAULT_MAX_NR_GRANT_FRAMES * + MAX_MAPTRACK_TO_GRANTS_RATIO; +integer_param("gnttab_max_nr_maptrack_frames", max_nr_maptrack_frames); #define MAPTRACK_TAIL (~0u) @@ -271,7 +270,7 @@ get_maptrack_handle( while ( unlikely((handle = __get_maptrack_handle(lgt)) == -1) ) { nr_frames = nr_maptrack_frames(lgt); - if ( nr_frames >= max_nr_maptrack_frames() ) + if ( nr_frames >= max_nr_maptrack_frames ) break; new_mt = alloc_xenheap_page(); @@ -2659,7 +2658,7 @@ grant_table_create( /* Tracking of mapped foreign frames table */ if ( (t->maptrack = xzalloc_array(struct grant_mapping *, - max_nr_maptrack_frames())) == NULL ) + max_nr_maptrack_frames)) == NULL ) goto no_mem_2; if ( (t->maptrack[0] = alloc_xenheap_page()) == NULL ) goto no_mem_3; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |