lkml.org 
[lkml]   [2016]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
    Date
    > > +/*
    > > + * VIRTIO_BALLOON_PFNS_LIMIT is used to limit the size of page bitmap
    > > + * to prevent a very large page bitmap, there are two reasons for this:
    > > + * 1) to save memory.
    > > + * 2) allocate a large bitmap may fail.
    > > + *
    > > + * The actual limit of pfn is determined by:
    > > + * pfn_limit = min(max_pfn, VIRTIO_BALLOON_PFNS_LIMIT);
    > > + *
    > > + * If system has more pages than VIRTIO_BALLOON_PFNS_LIMIT, we will
    > > +scan
    > > + * the page list and send the PFNs with several times. To reduce the
    > > + * overhead of scanning the page list. VIRTIO_BALLOON_PFNS_LIMIT
    > > +should
    > > + * be set with a value which can cover most cases.
    > > + */
    > > +#define VIRTIO_BALLOON_PFNS_LIMIT ((32 * (1ULL << 30)) >>
    > PAGE_SHIFT)
    > > +/* 32GB */
    > > +
    > > static int oom_pages = OOM_VBALLOON_DEFAULT_PAGES;
    > > module_param(oom_pages, int, S_IRUSR | S_IWUSR);
    > > MODULE_PARM_DESC(oom_pages, "pages to free on OOM");
    > >
    > > +extern unsigned long get_max_pfn(void);
    > > +
    >
    > Please just include the correct header. No need for this hackery.
    >

    Will change. Thanks!

    Liang

    \
     
     \ /
      Last update: 2016-07-28 06:21    [W:2.551 / U:0.600 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site