Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1573598 > unrolled thread

RE: [PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process

Started by"Li, Liang Z" <liang.z.li@intel.com>
First post2017-02-04 05:40 +0100
Last post2017-02-04 05:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate  process "Li, Liang Z" <liang.z.li@intel.com> - 2017-02-04 05:40 +0100

#1573598 — RE: [PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process

From"Li, Liang Z" <liang.z.li@intel.com>
Date2017-02-04 05:40 +0100
SubjectRE: [PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
Message-ID<t70iJ-3E0-3@gated-at.bofh.it>
> <snip>
> 
> > +static void free_extended_page_bitmap(struct virtio_balloon *vb) {
> > +	int i, bmap_count = vb->nr_page_bmap;
> > +
> > +	for (i = 1; i < bmap_count; i++) {
> > +		kfree(vb->page_bitmap[i]);
> > +		vb->page_bitmap[i] = NULL;
> > +		vb->nr_page_bmap--;
> > +	}
> > +}
> > +
> > +static void kfree_page_bitmap(struct virtio_balloon *vb) {
> > +	int i;
> > +
> > +	for (i = 0; i < vb->nr_page_bmap; i++)
> > +		kfree(vb->page_bitmap[i]);
> > +}
> 
> It might be worth commenting that pair of functions to make it clear why
> they are so different; I guess the kfree_page_bitmap is used just before you
> free the structure above it so you don't need to keep the count/pointers
> updated?
> 

Yes. I will add some comments for that. Thanks!

Liang
 
> Dave
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web