[PATCH v26 0/2] Virtio-balloon: support free page reporting

2018-02-04 Thread Wei Wang
(vb->balloon_wq); v21->v22: - add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (2): mm: support reporting free page blocks virtio-balloon

[PATCH v26 0/2] Virtio-balloon: support free page reporting

2018-02-04 Thread Wei Wang
(vb->balloon_wq); v21->v22: - add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (2): mm: support reporting free page blocks virtio-balloon

[PATCH v26 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-02-04 Thread Wei Wang
sending the starting cmd id, so the guest doesn't need to kick after filling an element to the vq. Host may also requests the guest to stop the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Sign

[PATCH v26 1/2] mm: support reporting free page blocks

2018-02-04 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v26 1/2] mm: support reporting free page blocks

2018-02-04 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

[PATCH v26 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-02-04 Thread Wei Wang
sending the starting cmd id, so the guest doesn't need to kick after filling an element to the vq. Host may also requests the guest to stop the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S

Re: [PATCH v25 0/2] Virtio-balloon: support free page reporting

2018-02-02 Thread Wei Wang
On 02/02/2018 03:15 AM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05:14:04PM +0800, Wei Wang wrote: This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables

Re: [PATCH v25 0/2] Virtio-balloon: support free page reporting

2018-02-02 Thread Wei Wang
On 02/02/2018 03:15 AM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05:14:04PM +0800, Wei Wang wrote: This patch series is separated from the previous "Virtio-balloon Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT, implemented by this series enables

Re: suspicious RCU usage at net/ipv6/ip6_fib.c:LINE

2018-02-01 Thread Wei Wang
On Thu, Feb 1, 2018 at 2:56 PM, Eric Biggers wrote: > +wei...@google.com > > On Tue, Jan 02, 2018 at 03:58:02PM -0800, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 6bb8824732f69de0f233ae6b1a8158e149627b38 >>

Re: suspicious RCU usage at net/ipv6/ip6_fib.c:LINE

2018-02-01 Thread Wei Wang
On Thu, Feb 1, 2018 at 2:56 PM, Eric Biggers wrote: > +wei...@google.com > > On Tue, Jan 02, 2018 at 03:58:02PM -0800, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 6bb8824732f69de0f233ae6b1a8158e149627b38 >>

Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-02-01 Thread Wei Wang
On 01/31/2018 07:44 AM, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 11:31:19AM +0800, Wei Wang wrote: On 01/26/2018 10:42 AM, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 09:40:44AM +0800, Wei Wang wrote: On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05

Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-02-01 Thread Wei Wang
On 01/31/2018 07:44 AM, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 11:31:19AM +0800, Wei Wang wrote: On 01/26/2018 10:42 AM, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 09:40:44AM +0800, Wei Wang wrote: On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05

Re: general protection fault in fib6_add (2)

2018-01-30 Thread Wei Wang
On Tue, Jan 30, 2018 at 5:16 PM, Eric Biggers <ebigge...@gmail.com> wrote: > On Wed, Jan 03, 2018 at 10:53:02AM -0800, 'Wei Wang' via syzkaller-bugs wrote: >> On Wed, Jan 3, 2018 at 8:16 AM, David Ahern <dsah...@gmail.com> wrote: >> > [ +wei...@google.com ] >&

Re: general protection fault in fib6_add (2)

2018-01-30 Thread Wei Wang
On Tue, Jan 30, 2018 at 5:16 PM, Eric Biggers wrote: > On Wed, Jan 03, 2018 at 10:53:02AM -0800, 'Wei Wang' via syzkaller-bugs wrote: >> On Wed, Jan 3, 2018 at 8:16 AM, David Ahern wrote: >> > [ +wei...@google.com ] >> > >> > On 1/2/18 3:58 PM, syzbot wrote

Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/26/2018 10:42 AM, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 09:40:44AM +0800, Wei Wang wrote: On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05:14:06PM +0800, Wei Wang wrote: The controversy is that the free list is not static once the lock

Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/26/2018 10:42 AM, Michael S. Tsirkin wrote: On Fri, Jan 26, 2018 at 09:40:44AM +0800, Wei Wang wrote: On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05:14:06PM +0800, Wei Wang wrote: The controversy is that the free list is not static once the lock

Re: [PATCH v24 1/2] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
On 01/25/2018 09:41 PM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:41PM +0800, Wei Wang wrote: This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is relea

Re: [PATCH v24 1/2] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
On 01/25/2018 09:41 PM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:41PM +0800, Wei Wang wrote: This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is relea

Re: [PATCH v25 1/2 RESEND] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
On 01/26/2018 06:41 AM, Andrew Morton wrote: On Thu, 25 Jan 2018 17:38:27 +0800 Wei Wang <wei.w.w...@intel.com> wrote: This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone

Re: [PATCH v25 1/2 RESEND] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
On 01/26/2018 06:41 AM, Andrew Morton wrote: On Thu, 25 Jan 2018 17:38:27 +0800 Wei Wang wrote: This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is released,

Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05:14:06PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ + struct virtio_balloon *vb; + int ret; + + vb = container_of(work, struct virtio_balloon

Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: On Thu, Jan 25, 2018 at 05:14:06PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ + struct virtio_balloon *vb; + int ret; + + vb = container_of(work, struct virtio_balloon

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/25/2018 07:28 PM, Tetsuo Handa wrote: On 2018/01/25 12:32, Wei Wang wrote: On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ +struct virtio_balloon *vb

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/25/2018 07:28 PM, Tetsuo Handa wrote: On 2018/01/25 12:32, Wei Wang wrote: On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ +struct virtio_balloon *vb

Re: [virtio-dev] [PATCH v25 1/2 RESEND] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
Hi Michal, On 01/25/2018 05:38 PM, Wei Wang wrote: This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is released, so it is the caller's responsibility to either det

Re: [virtio-dev] [PATCH v25 1/2 RESEND] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
Hi Michal, On 01/25/2018 05:38 PM, Wei Wang wrote: This patch adds support to walk through the free page blocks in the system and report them via a callback function. Some page blocks may leave the free list after zone->lock is released, so it is the caller's responsibility to either det

[PATCH v25 1/2 RESEND] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v25 1/2 RESEND] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: What is this doing? Basically handling the case where vq is broken? It's kind of ugly to tweak feature bits, most code assumes they never change. Please just return an error

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: What is this doing? Basically handling the case where vq is broken? It's kind of ugly to tweak feature bits, most code assumes they never change. Please just return an error

[PATCH v25 0/2] Virtio-balloon: support free page reporting

2018-01-25 Thread Wei Wang
implementation; - add destroy_workqueue(vb->balloon_wq); v21->v22: - add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (2): mm: support reporting free page

[PATCH v25 0/2] Virtio-balloon: support free page reporting

2018-01-25 Thread Wei Wang
implementation; - add destroy_workqueue(vb->balloon_wq); v21->v22: - add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (2): mm: support reporting free page

[PATCH v25 1/2] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v25 1/2] mm: support reporting free page blocks

2018-01-25 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

[PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Michal Hocko <mho...@kernel.org

[PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-25 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko --- drivers/virtio/virtio_balloon.c | 251 ++-- include/uapi/linux

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-24 Thread Wei Wang
On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ + struct virtio_balloon *vb; + unsigned long flags; + + vb = container_of(work, struct virtio_balloon

Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-24 Thread Wei Wang
On 01/25/2018 01:15 AM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 06:42:42PM +0800, Wei Wang wrote: + +static void report_free_page_func(struct work_struct *work) +{ + struct virtio_balloon *vb; + unsigned long flags; + + vb = container_of(work, struct virtio_balloon

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-24 Thread Wei Wang
On 01/24/2018 12:29 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 07:25:45PM +0800, Wei Wang wrote: On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-24 Thread Wei Wang
On 01/24/2018 12:29 PM, Michael S. Tsirkin wrote: On Mon, Jan 22, 2018 at 07:25:45PM +0800, Wei Wang wrote: On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01

[PATCH v24 1/2] mm: support reporting free page blocks

2018-01-24 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v24 0/2] Virtio-balloon: support free page reporting

2018-01-24 Thread Wei Wang
to have simpler implementation; - add destroy_workqueue(vb->balloon_wq); v21->v22: - add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/

[PATCH v24 1/2] mm: support reporting free page blocks

2018-01-24 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

[PATCH v24 0/2] Virtio-balloon: support free page reporting

2018-01-24 Thread Wei Wang
to have simpler implementation; - add destroy_workqueue(vb->balloon_wq); v21->v22: - add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/

[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-24 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Michal Hocko <mho...@kernel.org

[PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-01-24 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko --- drivers/virtio/virtio_balloon.c | 265 +++- include/uapi/linux

Re: [PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-23 Thread Wei Wang
On 01/24/2018 01:01 PM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 10:50:27AM +0800, Wei Wang wrote: This will not DTRT in all cases. It's quite possible that host does not need the kick when ring is half full but does need it later when ring is full. You can kick at ring half full

Re: [PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-23 Thread Wei Wang
On 01/24/2018 01:01 PM, Michael S. Tsirkin wrote: On Wed, Jan 24, 2018 at 10:50:27AM +0800, Wei Wang wrote: This will not DTRT in all cases. It's quite possible that host does not need the kick when ring is half full but does need it later when ring is full. You can kick at ring half full

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-23 Thread Wei Wang
On 01/22/2018 07:25 PM, Wei Wang wrote: On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: +vb->start_cmd_id = cmd

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-23 Thread Wei Wang
On 01/22/2018 07:25 PM, Wei Wang wrote: On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: +vb->start_cmd_id = cmd

[PATCH v23 0/2] Virtio-balloon: support free page reporting

2018-01-23 Thread Wei Wang
add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (2): mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PA

[PATCH v23 0/2] Virtio-balloon: support free page reporting

2018-01-23 Thread Wei Wang
add_one_sg: some code and comment re-arrangement - send_cmd_id: handle a cornercase For previous ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (2): mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PA

[PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-23 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Michal Hocko <mho...@kernel.org

[PATCH v23 1/2] mm: support reporting free page blocks

2018-01-23 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v23 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-23 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko --- drivers/virtio/virtio_balloon.c | 228 ++-- include/uapi/linux

[PATCH v23 1/2] mm: support reporting free page blocks

2018-01-23 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-22 Thread Wei Wang
On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: + vb->start_cmd_id = cmd_id; + queue_work

Re: [virtio-dev] Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-22 Thread Wei Wang
On 01/19/2018 08:39 PM, Michael S. Tsirkin wrote: On Fri, Jan 19, 2018 at 11:44:21AM +0800, Wei Wang wrote: On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: + vb->start_cmd_id = cmd_id; + queue_work

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-18 Thread Wei Wang
On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: +static void virtballoon_changed(struct virtio_device *vdev) +{ + struct virtio_balloon *vb = vdev->priv; + unsigned long flags; + __u32 cmd_id; + s64 d

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-18 Thread Wei Wang
On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: +static void virtballoon_changed(struct virtio_device *vdev) +{ + struct virtio_balloon *vb = vdev->priv; + unsigned long flags; + __u32 cmd_id; + s64 d

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-18 Thread Wei Wang
On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: +{ + struct scatterlist sg; + unsigned int unused; + int err; + + sg_init_one(, addr, sizeof(uint32_t)); This passes a guest-endian value to host

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-18 Thread Wei Wang
On 01/18/2018 12:44 AM, Michael S. Tsirkin wrote: On Wed, Jan 17, 2018 at 01:10:11PM +0800, Wei Wang wrote: +{ + struct scatterlist sg; + unsigned int unused; + int err; + + sg_init_one(, addr, sizeof(uint32_t)); This passes a guest-endian value to host

Re: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

2018-01-17 Thread Wei Wang
On Wed, Jan 3, 2018 at 3:31 PM, Cong Wang wrote: > > On Wed, Jan 3, 2018 at 12:55 PM, Ozgur wrote: > > > > > > 03.01.2018, 21:57, "Cong Wang" : > >> On Tue, Jan 2, 2018 at 3:58 PM, syzbot > >>

Re: KASAN: slab-out-of-bounds Write in tcp_v6_syn_recv_sock

2018-01-17 Thread Wei Wang
On Wed, Jan 3, 2018 at 3:31 PM, Cong Wang wrote: > > On Wed, Jan 3, 2018 at 12:55 PM, Ozgur wrote: > > > > > > 03.01.2018, 21:57, "Cong Wang" : > >> On Tue, Jan 2, 2018 at 3:58 PM, syzbot > >> wrote: > >>> Hello, > >>> > >>> syzkaller hit the following crash on > >>>

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Wei Wang
On 01/17/2018 05:27 PM, Pankaj Gupta wrote: On 01/17/2018 04:21 PM, Pankaj Gupta wrote: o.k you have initialize "err = -ENOMEM;" Remove these four lines. -kfree(names); -kfree(callbacks); -kfree(vqs); -return 0; +err = 0; //

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Wei Wang
On 01/17/2018 05:27 PM, Pankaj Gupta wrote: On 01/17/2018 04:21 PM, Pankaj Gupta wrote: o.k you have initialize "err = -ENOMEM;" Remove these four lines. -kfree(names); -kfree(callbacks); -kfree(vqs); -return 0; +err = 0; //

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Wei Wang
. Host may also requests the guest to stop the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc:

Re: [PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Wei Wang
. Host may also requests the guest to stop the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko --- drivers/virtio/virtio_balloon.c | 242

[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-16 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Michal Hocko <mho...@kernel.org

[PATCH v22 3/3] virtio-balloon: don't report free pages when page poisoning is enabled

2018-01-16 Thread Wei Wang
adds a config field, poison_val. Guest writes to the config field to tell the host about the poisoning value. The value will be 0 in the following cases: 1) PAGE_POISONING_NO_SANITY is enabled; 2) page poisoning is disabled; or 3) PAGE_POISONING_ZERO is enabled. Signed-off-by: Wei Wang <wei.

[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-16 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko --- drivers/virtio/virtio_balloon.c | 242 +++- include/uapi/linux

[PATCH v22 3/3] virtio-balloon: don't report free pages when page poisoning is enabled

2018-01-16 Thread Wei Wang
adds a config field, poison_val. Guest writes to the config field to tell the host about the poisoning value. The value will be 0 in the following cases: 1) PAGE_POISONING_NO_SANITY is enabled; 2) page poisoning is disabled; or 3) PAGE_POISONING_ZERO is enabled. Signed-off-by: Wei Wang Suggested

[PATCH v22 1/3] mm: support reporting free page blocks

2018-01-16 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v22 1/3] mm: support reporting free page blocks

2018-01-16 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

[PATCH v22 0/3] Virtio-balloon: support free page reporting

2018-01-16 Thread Wei Wang
nd comment re-arrangement - send_cmd_id: handle a cornercase For precious ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (3): mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ virtio-balloon: don't report free pages when page

[PATCH v22 0/3] Virtio-balloon: support free page reporting

2018-01-16 Thread Wei Wang
nd comment re-arrangement - send_cmd_id: handle a cornercase For precious ChangeLog, please reference https://lwn.net/Articles/743660/ Wei Wang (3): mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ virtio-balloon: don't report free pages when page

Re: [PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-12 Thread Wei Wang
On 01/11/2018 07:06 PM, Tetsuo Handa wrote: Wei Wang wrote: Michael, could we merge patch 3-5 first? No! I'm repeatedly asking you to propose only VIRTIO_BALLOON_F_SG changes. Please don't ignore me. Patch 4 depends on patch 2. Thus, back to patch 2. There is not strict dependence per se

Re: [PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-12 Thread Wei Wang
On 01/11/2018 07:06 PM, Tetsuo Handa wrote: Wei Wang wrote: Michael, could we merge patch 3-5 first? No! I'm repeatedly asking you to propose only VIRTIO_BALLOON_F_SG changes. Please don't ignore me. Patch 4 depends on patch 2. Thus, back to patch 2. There is not strict dependence per se

Re: [PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-10 Thread Wei Wang
On 01/09/2018 10:42 PM, Tetsuo Handa wrote: Wei Wang wrote: - enable OOM to free inflated pages maintained in the local temporary list. I do want to see it before applying this patch. Fine, then what do you think of the method I shared in your post here: https://patchwork.kernel.org

Re: [PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-10 Thread Wei Wang
On 01/09/2018 10:42 PM, Tetsuo Handa wrote: Wei Wang wrote: - enable OOM to free inflated pages maintained in the local temporary list. I do want to see it before applying this patch. Fine, then what do you think of the method I shared in your post here: https://patchwork.kernel.org

[PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-09 Thread Wei Wang
OOM to free inflated pages maintained in the local temporary list. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Suggested-by: Michael S. Tsirkin <m...@redhat.com> Cc: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp

[PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-09 Thread Wei Wang
OOM to free inflated pages maintained in the local temporary list. Signed-off-by: Wei Wang Signed-off-by: Liang Li Suggested-by: Michael S. Tsirkin Cc: Tetsuo Handa --- drivers/virtio/virtio_balloon.c | 233 +--- include/uapi/linux/virtio_balloon.h | 1

[PATCH v21 2/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-09 Thread Wei Wang
OOM to free inflated pages maintained in the local temporary list. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Suggested-by: Michael S. Tsirkin <m...@redhat.com> Cc: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp

[PATCH v21 2/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-09 Thread Wei Wang
OOM to free inflated pages maintained in the local temporary list. Signed-off-by: Wei Wang Signed-off-by: Liang Li Suggested-by: Michael S. Tsirkin Cc: Tetsuo Handa --- drivers/virtio/virtio_balloon.c | 233 +--- include/uapi/linux/virtio_balloon.h | 1

[PATCH v21 5/5] virtio-balloon: don't report free pages when page poisoning is enabled

2018-01-09 Thread Wei Wang
adds a config field, poison_val. Guest writes to the config field to tell the host about the poisoning value. The value will be 0 in the following cases: 1) PAGE_POISONING_NO_SANITY is enabled; 2) page poisoning is disabled; or 3) PAGE_POISONING_ZERO is enabled. Signed-off-by: Wei Wang <wei.

[PATCH v21 5/5] virtio-balloon: don't report free pages when page poisoning is enabled

2018-01-09 Thread Wei Wang
adds a config field, poison_val. Guest writes to the config field to tell the host about the poisoning value. The value will be 0 in the following cases: 1) PAGE_POISONING_NO_SANITY is enabled; 2) page poisoning is disabled; or 3) PAGE_POISONING_ZERO is enabled. Signed-off-by: Wei Wang Suggested

[PATCH v21 3/5] mm: support reporting free page blocks

2018-01-09 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michal Hocko <mho...@kernel.org> C

[PATCH v21 3/5] mm: support reporting free page blocks

2018-01-09 Thread Wei Wang
ges but are written after the report function returns will be captured by the hypervisor, and they will be added to the next round of memory transfer. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michal Hocko Cc: Michael S. Tsirkin Acked-by: Michal Hocko --- include/linux/mm.h | 6

[PATCH v21 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-09 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang <wei.w.w...@intel.com> Signed-off-by: Liang Li <liang.z...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Michal Hocko <mho...@kernel.org

[PATCH v21 1/5] xbitmap: Introduce xbitmap

2018-01-09 Thread Wei Wang
From: Matthew Wilcox <mawil...@microsoft.com> The eXtensible Bitmap is a sparse bitmap representation which is efficient for set bits which tend to cluster. It supports up to 'unsigned long' worth of bits. Signed-off-by: Matthew Wilcox <mawil...@microsoft.com> Signed-off-by: Wei W

[PATCH v21 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-09 Thread Wei Wang
the reporting in advance by sending the stop cmd id to the guest via the configuration register. Signed-off-by: Wei Wang Signed-off-by: Liang Li Cc: Michael S. Tsirkin Cc: Michal Hocko --- drivers/virtio/virtio_balloon.c | 202 ++-- include/uapi/linux

[PATCH v21 1/5] xbitmap: Introduce xbitmap

2018-01-09 Thread Wei Wang
From: Matthew Wilcox The eXtensible Bitmap is a sparse bitmap representation which is efficient for set bits which tend to cluster. It supports up to 'unsigned long' worth of bits. Signed-off-by: Matthew Wilcox Signed-off-by: Wei Wang Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S

[PATCH v21 0/5] Virtio-balloon Enhancement

2018-01-09 Thread Wei Wang
e-write the virtio-balloon implementation patch. 3) commit changes 4) patch re-org Matthew Wilcox (1): xbitmap: Introduce xbitmap Wei Wang (4): virtio-balloon: VIRTIO_BALLOON_F_SG mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ virtio-balloo

[PATCH v21 0/5] Virtio-balloon Enhancement

2018-01-09 Thread Wei Wang
e-write the virtio-balloon implementation patch. 3) commit changes 4) patch re-org Matthew Wilcox (1): xbitmap: Introduce xbitmap Wei Wang (4): virtio-balloon: VIRTIO_BALLOON_F_SG mm: support reporting free page blocks virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ virtio-balloo

Re: [PATCH] virtio_balloon: use non-blocking allocation

2018-01-03 Thread Wei Wang
ove.sakura.ne.jp> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Wei Wang <wei.w.w...@intel.com> Cc: Matthew Wilcox <wi...@infradead.org> Cc: Michal Hocko <mho...@suse.com> --- drivers/virtio/virtio_balloon.c | 23 +-- mm/balloon_compaction.c | 5

Re: [PATCH] virtio_balloon: use non-blocking allocation

2018-01-03 Thread Wei Wang
cause __gfp_pfmemalloc_flags() to return ALLOC_OOM. But since some process context might start calling balloon_page_alloc() in future, this patch does not remove __GFP_NOMEMALLOC. (Only compile tested. Please do runtime tests before committing.) Signed-off-by: Tetsuo Handa Cc: Michael S. Tsirkin Cc:

Re: general protection fault in fib6_add (2)

2018-01-03 Thread Wei Wang
On Wed, Jan 3, 2018 at 8:16 AM, David Ahern wrote: > [ +wei...@google.com ] > > On 1/2/18 3:58 PM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 61233580f1f33c50e159c50e24d80ffd2ba2e06b >>

Re: general protection fault in fib6_add (2)

2018-01-03 Thread Wei Wang
On Wed, Jan 3, 2018 at 8:16 AM, David Ahern wrote: > [ +wei...@google.com ] > > On 1/2/18 3:58 PM, syzbot wrote: >> Hello, >> >> syzkaller hit the following crash on >> 61233580f1f33c50e159c50e24d80ffd2ba2e06b >> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master >> compiler:

Re: [PATCH v20 4/7] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-03 Thread Wei Wang
On 01/03/2018 10:29 AM, Tetsuo Handa wrote: Matthew Wilcox wrote: The radix tree convention is objectively awful, which is why I'm working to change it. Specifying the GFP flags at radix tree initialisation time rather than allocation time leads to all kinds of confusion. The preload API is a

Re: [PATCH v20 4/7] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-03 Thread Wei Wang
On 01/03/2018 10:29 AM, Tetsuo Handa wrote: Matthew Wilcox wrote: The radix tree convention is objectively awful, which is why I'm working to change it. Specifying the GFP flags at radix tree initialisation time rather than allocation time leads to all kinds of confusion. The preload API is a

<    1   2   3   4   5   6   7   8   9   10   >