Displaying 20 results from an estimated 35 matches for "default_seek".
Did you mean:
default_seeks
2018 Aug 03
2
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
...Wang wrote:
> +static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
> +{
> + vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
> + vb->shrinker.count_objects = virtio_balloon_shrinker_count;
> + vb->shrinker.batch = 0;
> + vb->shrinker.seeks = DEFAULT_SEEKS;
Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
and is nowhere zero-cleared, KASAN would complain it.
> +
> + return register_shrinker(&vb->shrinker);
> +}
2018 Aug 03
2
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
...Wang wrote:
> +static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
> +{
> + vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
> + vb->shrinker.count_objects = virtio_balloon_shrinker_count;
> + vb->shrinker.batch = 0;
> + vb->shrinker.seeks = DEFAULT_SEEKS;
Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
and is nowhere zero-cleared, KASAN would complain it.
> +
> + return register_shrinker(&vb->shrinker);
> +}
2018 Aug 06
2
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
..._shrinker(struct virtio_balloon *vb)
>>> +{
>>> +??? vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
>>> +??? vb->shrinker.count_objects = virtio_balloon_shrinker_count;
>>> +??? vb->shrinker.batch = 0;
>>> +??? vb->shrinker.seeks = DEFAULT_SEEKS;
>> Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
>> and is nowhere zero-cleared, KASAN would complain it.
>
> Could you point where in the code that would complain it?
> I only see two shrinker flags (NUMA_AWARE and MEMCG_AWARE), and they seem not rel...
2018 Aug 06
2
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
..._shrinker(struct virtio_balloon *vb)
>>> +{
>>> +??? vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
>>> +??? vb->shrinker.count_objects = virtio_balloon_shrinker_count;
>>> +??? vb->shrinker.batch = 0;
>>> +??? vb->shrinker.seeks = DEFAULT_SEEKS;
>> Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
>> and is nowhere zero-cleared, KASAN would complain it.
>
> Could you point where in the code that would complain it?
> I only see two shrinker flags (NUMA_AWARE and MEMCG_AWARE), and they seem not rel...
2018 Aug 06
1
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
...>>> +*vb) {
>>>>> +??? vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
>>>>> +??? vb->shrinker.count_objects = virtio_balloon_shrinker_count;
>>>>> +??? vb->shrinker.batch = 0;
>>>>> +??? vb->shrinker.seeks = DEFAULT_SEEKS;
>>>> Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
>>>> and is nowhere zero-cleared, KASAN would complain it.
>>>
>>> Could you point where in the code that would complain it?
>>> I only see two shrinker flags (NUMA_AWARE...
2020 Jun 08
0
[PATCH AUTOSEL 5.6 165/606] virtio-balloon: Revert "virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM"
...AGES) /
- VIRTIO_BALLOON_PAGES_PER_PAGE;
- update_balloon_size(vb);
+static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
+{
+ vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
+ vb->shrinker.count_objects = virtio_balloon_shrinker_count;
+ vb->shrinker.seeks = DEFAULT_SEEKS;
- return NOTIFY_OK;
+ return register_shrinker(&vb->shrinker);
}
static int virtballoon_probe(struct virtio_device *vdev)
@@ -900,35 +935,22 @@ static int virtballoon_probe(struct virtio_device *vdev)
virtio_cwrite(vb->vdev, struct virtio_balloon_config,
poison_val,...
2020 Jun 08
0
[PATCH AUTOSEL 5.6 240/606] Revert "virtio-balloon: Revert "virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM""
...struct virtio_balloon, oom_nb);
+ unsigned long *freed = parm;
-static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
-{
- vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
- vb->shrinker.count_objects = virtio_balloon_shrinker_count;
- vb->shrinker.seeks = DEFAULT_SEEKS;
+ *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
+ VIRTIO_BALLOON_PAGES_PER_PAGE;
+ update_balloon_size(vb);
- return register_shrinker(&vb->shrinker);
+ return NOTIFY_OK;
}
static int virtballoon_probe(struct virtio_device *vdev)
@@ -935,22 +900,35 @@ static int virtba...
2020 Feb 05
12
[PATCH v1 0/3] virtio-balloon: Fixes + switch back to OOM handler
Two fixes for issues I stumbled over while working on patch #3.
Switch back to the good ol' OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
as the switch to the shrinker introduce some undesired side effects. Keep
the shrinker in place to handle VIRTIO_BALLOON_F_FREE_PAGE_HINT.
Lengthy discussion under [1].
I tested with QEMU and "deflate-on-oom=on". Works as expected. Did not
test
2018 Aug 03
4
[PATCH v3 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page
reporting" series to make some improvements.
ChangeLog:
v2->v3:
- shrink the balloon pages according to the amount requested by the
claimer, instead of using a user specified number;
v1->v2:
- register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is
negotiated.
Wei Wang (2):
virtio-balloon: remove BUG()
2020 Feb 05
0
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...struct virtio_balloon, oom_nb);
+ unsigned long *freed = parm;
-static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
-{
- vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
- vb->shrinker.count_objects = virtio_balloon_shrinker_count;
- vb->shrinker.seeks = DEFAULT_SEEKS;
+ *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
+ VIRTIO_BALLOON_PAGES_PER_PAGE;
+ update_balloon_size(vb);
- return register_shrinker(&vb->shrinker);
+ return NOTIFY_OK;
}
static int virtballoon_probe(struct virtio_device *vdev)
@@ -933,22 +898,35 @@ static int virtba...
2020 Feb 05
2
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...ed long *freed = parm;
>
> -static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
> -{
> - vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
> - vb->shrinker.count_objects = virtio_balloon_shrinker_count;
> - vb->shrinker.seeks = DEFAULT_SEEKS;
> + *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
> + VIRTIO_BALLOON_PAGES_PER_PAGE;
> + update_balloon_size(vb);
>
> - return register_shrinker(&vb->shrinker);
> + return NOTIFY_OK;
> }
>
> static int virtbal...
2020 Feb 05
2
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...ed long *freed = parm;
>
> -static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
> -{
> - vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
> - vb->shrinker.count_objects = virtio_balloon_shrinker_count;
> - vb->shrinker.seeks = DEFAULT_SEEKS;
> + *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
> + VIRTIO_BALLOON_PAGES_PER_PAGE;
> + update_balloon_size(vb);
>
> - return register_shrinker(&vb->shrinker);
> + return NOTIFY_OK;
> }
>
> static int virtbal...
2020 Apr 15
0
[PATCH AUTOSEL 5.6 111/129] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...struct virtio_balloon, oom_nb);
+ unsigned long *freed = parm;
-static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
-{
- vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
- vb->shrinker.count_objects = virtio_balloon_shrinker_count;
- vb->shrinker.seeks = DEFAULT_SEEKS;
+ *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
+ VIRTIO_BALLOON_PAGES_PER_PAGE;
+ update_balloon_size(vb);
- return register_shrinker(&vb->shrinker);
+ return NOTIFY_OK;
}
static int virtballoon_probe(struct virtio_device *vdev)
@@ -935,22 +900,35 @@ static int virtba...
2020 Apr 15
0
[PATCH AUTOSEL 5.5 091/106] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...struct virtio_balloon, oom_nb);
+ unsigned long *freed = parm;
-static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
-{
- vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
- vb->shrinker.count_objects = virtio_balloon_shrinker_count;
- vb->shrinker.seeks = DEFAULT_SEEKS;
+ *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
+ VIRTIO_BALLOON_PAGES_PER_PAGE;
+ update_balloon_size(vb);
- return register_shrinker(&vb->shrinker);
+ return NOTIFY_OK;
}
static int virtballoon_probe(struct virtio_device *vdev)
@@ -935,22 +900,35 @@ static int virtba...
2018 Aug 06
0
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
...atic int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
>> +{
>> + vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
>> + vb->shrinker.count_objects = virtio_balloon_shrinker_count;
>> + vb->shrinker.batch = 0;
>> + vb->shrinker.seeks = DEFAULT_SEEKS;
> Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
> and is nowhere zero-cleared, KASAN would complain it.
Could you point where in the code that would complain it?
I only see two shrinker flags (NUMA_AWARE and MEMCG_AWARE), and they
seem not related to that.
Best,...
2018 Aug 06
0
[PATCH v3 2/2] virtio_balloon: replace oom notifier with shrinker
...alloon
> >>> +*vb) {
> >>> +??? vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
> >>> +??? vb->shrinker.count_objects = virtio_balloon_shrinker_count;
> >>> +??? vb->shrinker.batch = 0;
> >>> +??? vb->shrinker.seeks = DEFAULT_SEEKS;
> >> Why flags field is not set? If vb is allocated by kmalloc(GFP_KERNEL)
> >> and is nowhere zero-cleared, KASAN would complain it.
> >
> > Could you point where in the code that would complain it?
> > I only see two shrinker flags (NUMA_AWARE and MEMCG_AWARE...
2020 Feb 06
1
[PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...);
> + unsigned long *freed = parm;
>
> -static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
> -{
> - vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
> - vb->shrinker.count_objects = virtio_balloon_shrinker_count;
> - vb->shrinker.seeks = DEFAULT_SEEKS;
> + *freed += leak_balloon(vb, VIRTIO_BALLOON_OOM_NR_PAGES) /
> + VIRTIO_BALLOON_PAGES_PER_PAGE;
> + update_balloon_size(vb);
>
> - return register_shrinker(&vb->shrinker);
> + return NOTIFY_OK;
> }
>
> static int virtballoon_probe(struct virtio_device *...
2018 Jul 27
5
[PATCH v2 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page
reporting" series to make some improvements.
v1->v2 ChangeLog:
- register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated.
Wei Wang (2):
virtio-balloon: remove BUG() in init_vqs
virtio_balloon: replace oom notifier with shrinker
drivers/virtio/virtio_balloon.c | 125
2018 Jul 27
5
[PATCH v2 0/2] virtio-balloon: some improvements
This series is split from the "Virtio-balloon: support free page
reporting" series to make some improvements.
v1->v2 ChangeLog:
- register the shrinker when VIRTIO_BALLOON_F_DEFLATE_ON_OOM is negotiated.
Wei Wang (2):
virtio-balloon: remove BUG() in init_vqs
virtio_balloon: replace oom notifier with shrinker
drivers/virtio/virtio_balloon.c | 125
2018 Jul 27
0
[PATCH v2 2/2] virtio_balloon: replace oom notifier with shrinker
...ster_shrinker(&vb->shrinker);
+}
+
+static int virtio_balloon_register_shrinker(struct virtio_balloon *vb)
+{
+ vb->shrinker.scan_objects = virtio_balloon_shrinker_scan;
+ vb->shrinker.count_objects = virtio_balloon_shrinker_count;
+ vb->shrinker.batch = 0;
+ vb->shrinker.seeks = DEFAULT_SEEKS;
+
+ return register_shrinker(&vb->shrinker);
+}
+
static int virtballoon_probe(struct virtio_device *vdev)
{
struct virtio_balloon *vb;
@@ -580,17 +595,10 @@ static int virtballoon_probe(struct virtio_device *vdev)
if (err)
goto out_free_vb;
- vb->nb.notifier_call = virtballo...