On Mon, Jun 11, 2018 at 11:32:41AM -0700, Linus Torvalds wrote: > On Mon, Jun 11, 2018 at 9:24 AM Michael S. Tsirkin <mst@xxxxxxxxxx> wrote: > > > > virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT > > Is this really a good idea? Well knowing which pages are unused does seem to be useful. Do you refer to this generally or to the idea of scanning the free list, or to the specific implementation issues you listed below? > Plus it seems entirely broken. > > The report_pfn_range() callback is done under the zone lock, but > virtio_balloon_send_free_pages() (which is the only callback used that > I can find) does add_one_sg(), which does virtqueue_add_inbuf(vq, &sg, > 1, vq, GFP_KERNEL); > > So now we apparently do a GFP_KERNEL allocation insider the mm zone > lock, which is broken on just _so_ many levels. > > Pulled and then unpulled again. > > Either somebody needs to explain why I'm wrong and you can re-submit > this, or this kind of garbage needs to go away. > > I do *not* want to be in the situation where I pull stuff from the > virtio people that adds completely broken core VM functionality. > > Because if I'm in that situation, I will stop pulling from you guys. > Seriously. You have *no* place sending me broken shit that is outside > the virtio layer. > > Subsystems that break code MM will get shunned. You just aren't > important enough to allow you breaking code VM. > > Linus So no, it doesn't do any allocations - GFP_KERNEL or otherwise, but I agree how it might be confusing. So I'll drop this for now, but it would be nice if there is a bit more direction on this feature since I know several people are trying to work on this. -- MST