search for: add_sgs

Displaying 13 results from an estimated 13 matches for "add_sgs".

Did you mean: add_fs
2017 Oct 02
2
[RFC] [PATCH] mm,oom: Offload OOM notify callback to a kernel thread.
...; virtqueue_add > > can do GFP_KERNEL allocation and this is clearly wrong. Nobody should > try to allocate while we are in the OOM path. Michael, is there any way > to drop this? Yes - in practice it won't ever allocate - that path is never taken with add_outbuf - it is for add_sgs only. IMHO the issue is balloon inflation which needs to allocate memory. It does it under a mutex, and oom handler tries to take the same mutex. > -- > Michal Hocko > SUSE Labs
2017 Oct 02
2
[RFC] [PATCH] mm,oom: Offload OOM notify callback to a kernel thread.
...; virtqueue_add > > can do GFP_KERNEL allocation and this is clearly wrong. Nobody should > try to allocate while we are in the OOM path. Michael, is there any way > to drop this? Yes - in practice it won't ever allocate - that path is never taken with add_outbuf - it is for add_sgs only. IMHO the issue is balloon inflation which needs to allocate memory. It does it under a mutex, and oom handler tries to take the same mutex. > -- > Michal Hocko > SUSE Labs
2017 Oct 02
1
[RFC] [PATCH] mm,oom: Offload OOM notify callback to a kernel thread.
...allocation and this is clearly wrong. Nobody should > > > try to allocate while we are in the OOM path. Michael, is there any way > > > to drop this? > > > > Yes - in practice it won't ever allocate - that path is never taken > > with add_outbuf - it is for add_sgs only. > > > > IMHO the issue is balloon inflation which needs to allocate > > memory. It does it under a mutex, and oom handler tries to take the > > same mutex. > > try_lock for the oom notifier path should heal the problem then, righ? > At least for as a quick f...
2017 Oct 02
1
[RFC] [PATCH] mm,oom: Offload OOM notify callback to a kernel thread.
...allocation and this is clearly wrong. Nobody should > > > try to allocate while we are in the OOM path. Michael, is there any way > > > to drop this? > > > > Yes - in practice it won't ever allocate - that path is never taken > > with add_outbuf - it is for add_sgs only. > > > > IMHO the issue is balloon inflation which needs to allocate > > memory. It does it under a mutex, and oom handler tries to take the > > same mutex. > > try_lock for the oom notifier path should heal the problem then, righ? > At least for as a quick f...
2017 Oct 02
0
[RFC] [PATCH] mm,oom: Offload OOM notify callback to a kernel thread.
...t; > can do GFP_KERNEL allocation and this is clearly wrong. Nobody should > > try to allocate while we are in the OOM path. Michael, is there any way > > to drop this? > > Yes - in practice it won't ever allocate - that path is never taken > with add_outbuf - it is for add_sgs only. > > IMHO the issue is balloon inflation which needs to allocate > memory. It does it under a mutex, and oom handler tries to take the > same mutex. try_lock for the oom notifier path should heal the problem then, righ? At least for as a quick fix. -- Michal Hocko SUSE Labs
2023 Apr 07
0
[PATCH v2 2/2] rust: virtio: add virtio support
...e worst part of this patch by far, unfortunately. If one doesn't do this, then s/he will leak the `data` field passed in through into_foreign() here: > + // SAFETY: `self.ptr` is valid as per the type invariant. > + let res = unsafe { > + bindings::virtqueue_add_sgs( > + self.ptr, > + sgs.as_mut_ptr(), > + num_out as u32, > + num_in as u32, > + data.into_foreign() as _, > + gfp, > + ) > + }; > + Note the comment here: > +...
2023 Apr 05
3
[PATCH v2 0/2] rust: virtio: add virtio support
This used to be a single patch, but I split it into two with the addition of struct Scatterlist. Again a bit new with Rust submissions. I was told by Gary Guo to rebase on top of rust-next, but it seems *very* behind? The first patch does not build on its own due to a dead_code warning. It is hard to not have dead code when one is adding infrastructure to be used by others at a later
2017 Sep 11
6
mm, virtio: possible OOM lockup at virtballoon_oom_notify()
Hello. I noticed that virtio_balloon is using register_oom_notifier() and leak_balloon() from virtballoon_oom_notify() might depend on __GFP_DIRECT_RECLAIM memory allocation. In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to serialize against fill_balloon(). But in fill_balloon(), alloc_page(GFP_HIGHUSER[_MOVABLE] | __GFP_NOMEMALLOC | __GFP_NORETRY) is called with
2017 Sep 11
6
mm, virtio: possible OOM lockup at virtballoon_oom_notify()
Hello. I noticed that virtio_balloon is using register_oom_notifier() and leak_balloon() from virtballoon_oom_notify() might depend on __GFP_DIRECT_RECLAIM memory allocation. In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to serialize against fill_balloon(). But in fill_balloon(), alloc_page(GFP_HIGHUSER[_MOVABLE] | __GFP_NOMEMALLOC | __GFP_NORETRY) is called with
2013 Feb 19
24
[PATCH 00/16] virtio ring rework.
OK, this is (ab)uses some of Paolo's patches. The first 7 are candidates for this merge window (maybe), the rest I'm not so sure about. Thanks, Rusty. Paolo Bonzini (3): scatterlist: introduce sg_unmark_end virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_add_sgs on req path Rusty Russell (13): virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio-blk: use virtqueue_start_buf on bio path virtio_blk: remove nents member. virtio_ring: don't count elements twice for add_buf path. virtio_ring: virtqueue_add_outbuf / virtqueue_add_inbuf. v...
2013 Feb 19
24
[PATCH 00/16] virtio ring rework.
OK, this is (ab)uses some of Paolo's patches. The first 7 are candidates for this merge window (maybe), the rest I'm not so sure about. Thanks, Rusty. Paolo Bonzini (3): scatterlist: introduce sg_unmark_end virtio-blk: reorganize virtblk_add_req virtio-blk: use virtqueue_add_sgs on req path Rusty Russell (13): virtio_ring: virtqueue_add_sgs, to add multiple sgs. virtio-blk: use virtqueue_start_buf on bio path virtio_blk: remove nents member. virtio_ring: don't count elements twice for add_buf path. virtio_ring: virtqueue_add_outbuf / virtqueue_add_inbuf. v...
2013 Mar 18
28
[PATCH 00/22] virtqueue_add_sgs, virtqueue_add_outbuf, virtqueue_add_inbuf
Add virtqueue_add_sgs which is more general than virtqueue_add_buf, which makes virtio-scsi and virtio-blk nicer, then add virtqueue_add_inbuf and virtqueue_add_outbuf which handle the more general case, and finally delete virtqueue_add_buf(). I'm hoping this will be the final post of the whole series, and it can m...
2013 Mar 18
28
[PATCH 00/22] virtqueue_add_sgs, virtqueue_add_outbuf, virtqueue_add_inbuf
Add virtqueue_add_sgs which is more general than virtqueue_add_buf, which makes virtio-scsi and virtio-blk nicer, then add virtqueue_add_inbuf and virtqueue_add_outbuf which handle the more general case, and finally delete virtqueue_add_buf(). I'm hoping this will be the final post of the whole series, and it can m...