search for: do_shrink_slab

Displaying 4 results from an estimated 4 matches for "do_shrink_slab".

2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
On Fri, Jul 20, 2018 at 04:33:02PM +0800, Wei Wang wrote: > The OOM notifier is getting deprecated to use for the reasons mentioned > here by Michal Hocko: https://lkml.org/lkml/2018/7/12/314 > > This patch replaces the virtio-balloon oom notifier with a shrinker > to release balloon pages on memory pressure. > > In addition, the bug in the replaced virtballoon_oom_notify
2018 Jul 22
2
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
On Fri, Jul 20, 2018 at 04:33:02PM +0800, Wei Wang wrote: > The OOM notifier is getting deprecated to use for the reasons mentioned > here by Michal Hocko: https://lkml.org/lkml/2018/7/12/314 > > This patch replaces the virtio-balloon oom notifier with a shrinker > to release balloon pages on memory pressure. > > In addition, the bug in the replaced virtballoon_oom_notify
2018 Jul 23
0
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...>num_pages && pages_to_free) { >> + pages_to_free = balloon_pages_to_shrink - pages_freed; >> + pages_freed += leak_balloon(vb, pages_to_free); >> + } >> + update_balloon_size(vb); > Are you sure that this is never called if count returned 0? Yes. Please see do_shrink_slab, it just returns if count is 0. > >> + >> + return pages_freed / VIRTIO_BALLOON_PAGES_PER_PAGE; >> +} >> + >> +static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, >> + struct shrink_control *sc) >> +{ >> + struct...
2018 Jul 23
1
[PATCH v36 2/5] virtio_balloon: replace oom notifier with shrinker
...{ > > > + pages_to_free = balloon_pages_to_shrink - pages_freed; > > > + pages_freed += leak_balloon(vb, pages_to_free); > > > + } > > > + update_balloon_size(vb); > > Are you sure that this is never called if count returned 0? > > Yes. Please see do_shrink_slab, it just returns if count is 0. > > > > > > + > > > + return pages_freed / VIRTIO_BALLOON_PAGES_PER_PAGE; > > > +} > > > + > > > +static unsigned long virtio_balloon_shrinker_count(struct shrinker *shrinker, > > > + struct shr...