[virtio-dev] Re: [PATCH v4 00/20] Split device spec to its individual files

2023-01-13 Thread David Hildenbrand
On 12.01.23 22:22, Parav Pandit wrote: Relatively several of the recent device specifications are maintained in their own specification file. Such separate files enables better maintenance of the specification overall. However, several of the initial virtio device specifications are located in si

[virtio-dev] Re: [PATCH v4 06/20] virtio-mem-balloon: Maintain mem balloon device spec in separate directory

2023-01-13 Thread David Hildenbrand
On 12.01.23 22:22, Parav Pandit wrote: Move virtio memory balloon device specification to its own file similar to recent virtio devices. While at it, place device specification, its driver and device conformance into its own directory to have self contained device specification. Fixes: https://g

Re: [virtio-dev] [PATCH v3 06/20] virtio-mem-balloon: Maintain mem balloon device spec in separate directory

2023-01-11 Thread David Hildenbrand
On 11.01.23 16:01, Parav Pandit wrote: Hi David, Hi Parav, From: David Hildenbrand Sent: Wednesday, January 11, 2023 9:14 AM To: Parav Pandit ; m...@redhat.com; virtio-dev@lists.oasis- open.org; coh...@redhat.com Cc: virtio-comm...@lists.oasis-open.org Subject: Re: [virtio-dev] [PATCH v3

Re: [virtio-dev] [PATCH v3 06/20] virtio-mem-balloon: Maintain mem balloon device spec in separate directory

2023-01-11 Thread David Hildenbrand
On 11.01.23 00:03, Parav Pandit wrote: Move virtio memory balloon device specification to its own file similar to recent virtio devices. While at it, place device specification, its driver and device conformance into its own directory to have self contained device specification. Fixes: https://g

Re: [virtio-dev] Re: [PATCH 1/4] content: Introduce driver/device auxiliary notifications

2022-08-11 Thread David Hildenbrand
On 11.08.22 16:09, Halil Pasic wrote: > On Thu, 11 Aug 2022 10:53:35 +0200 > Cornelia Huck wrote: > >> On Wed, Aug 10 2022, Halil Pasic wrote: >> >>> On Wed, 10 Aug 2022 11:54:35 +0200 >>> Cornelia Huck wrote: >>> >> These device-specific notifications are needed later when adding support

[virtio-dev] Re: [PATCH] Virtio-balloon: add user space API for sizing

2022-02-15 Thread David Hildenbrand
On 14.02.22 20:59, Kameron Lutes wrote: > This new linux API will allow user space applications to directly > control the size of the virtio-balloon. This is useful in > situations where the guest must quickly respond to drastically > increased memory pressure and cannot wait for the host to adjust

Re: [virtio-dev] [PATCH RESEND] virtio-pmem: PMEM device spec

2021-08-04 Thread David Hildenbrand
On 04.08.21 13:07, Stefan Hajnoczi wrote: On Wed, Jul 28, 2021 at 05:04:35PM +0200, Pankaj Gupta wrote: Posting virtio specification for virtio pmem device. Virtio pmem is a paravirtualized device which allows the guest to bypass page cache. Virtio pmem kernel driver is merged in Upstream Kernel

[virtio-dev] Re: [PATCH RESEND] virtio-pmem: PMEM device spec

2021-08-03 Thread David Hildenbrand
Driver SHOULD handle multiple FLUSH requests on the files present on the Virtio pmem device. Same here. I'm afraid this is not easy :( hmm... The driver SHOULD handle multiple FLUSH requests. Do you want to say The driver MUST be able to handle concurrent FLUSH requests. ? -- Thanks, Da

[virtio-dev] Re: [PATCH RESEND] virtio-pmem: PMEM device spec

2021-08-03 Thread David Hildenbrand
On 03.08.21 10:26, Cornelia Huck wrote: On Fri, Jul 30 2021, Pankaj Gupta wrote: +Also, configures a flush callback function with the corresponding region. Not sure if that is too specific already... maybe something like "Also, it configures a notification for when the corresponding region i

[virtio-dev] Re: [virtio-comment] [PATCH RESEND v6 3/3] content: Document balloon feature free page reporting

2020-08-21 Thread David Hildenbrand
es where > some significant portion of the memory is idle. Add documentation for the > free page reporting feature describing the functionality and requirements. > > Reviewed-by: Cornelia Huck > Signed-off-by: Alexander Duyck Reviewed-by: David Hildenbrand Thanks!

[virtio-dev] Re: [virtio-comment] [PATCH RESEND v6 2/3] content: Document balloon feature page poison

2020-08-21 Thread David Hildenbrand
. > + > +The driver MUST NOT modify \field{poison_val} while the DRIVER_OK bit is set. > + > +\devicenormative{\paragraph}{Page Poison}{Device Types / Memory Balloon > Device / Device Operation / Page Poison} > + > +Normative statements in this section apply if the >

[virtio-dev] Re: [virtio-comment] [PATCH RESEND v6 1/3] content: Document balloon feature free page hints

2020-08-21 Thread David Hildenbrand
ed and we can work on a patch to > document the need to avoid the feature. > > Signed-off-by: Alexander Duyck Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb - To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

[virtio-dev] Re: [PATCH RESEND v6 0/3] virtio-spec: Add documentation for recently added balloon features

2020-08-18 Thread David Hildenbrand
On 18.08.20 19:32, Alexander Duyck wrote: > I am resending this patch set with the hope of getting final reviews sorted > out as I had no feedback on v6. If there are no further comments to be made > I will create an issue and ask for inclusion of this patch set. > You can open an issue right awa

[virtio-dev] Re: [PATCH v2] virtio-balloon: always indicate S_DONE when migration fails

2020-07-22 Thread David Hildenbrand
On 22.07.20 14:05, David Hildenbrand wrote: > On 22.07.20 14:04, Michael S. Tsirkin wrote: >> On Mon, Jun 29, 2020 at 10:06:15AM +0200, David Hildenbrand wrote: >>> If something goes wrong during precopy, before stopping the VM, we will >>> never send a S_DONE indicat

[virtio-dev] Re: [PATCH v2] virtio-balloon: always indicate S_DONE when migration fails

2020-07-22 Thread David Hildenbrand
On 22.07.20 14:04, Michael S. Tsirkin wrote: > On Mon, Jun 29, 2020 at 10:06:15AM +0200, David Hildenbrand wrote: >> If something goes wrong during precopy, before stopping the VM, we will >> never send a S_DONE indication to the VM, resulting in the hinted pages >> not gettin

Re: [virtio-dev] [PATCH] virtio-balloon: Document byte ordering of poison_val

2020-07-20 Thread David Hildenbrand
ON value was larger than a byte we would > + * need to byte swap poison_val here to guarantee it is > + * little-endian. However for now it is a single byte so we > + * can pass it as-is. Yeah, why not (although it's pretty fundamental that

[virtio-dev] Re: [PATCH v2 2/3] virtio-balloon: Add locking to prevent possible race when starting hinting

2020-07-10 Thread David Hildenbrand
ORT_S_REQUESTED; > +qemu_mutex_unlock(&s->free_page_lock); > + > virtio_notify_config(vdev); > } > > Yes, makes sense, thanks Acked-by: David Hildenbrand -- Thanks, David / dhildenb - To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

[virtio-dev] [PATCH v2] virtio-balloon: always indicate S_DONE when migration fails

2020-06-29 Thread David Hildenbrand
g is still weird, but that has to be sorted out separately. There is nothing to do in the PRECOPY_NOTIFY_COMPLETE case. Add some comments regarding S_DONE handling. Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Reviewed-by: Alexander Duyck Cc: Wei Wang

[virtio-dev] [PATCH v1] virtio-balloon: always indicate S_DONE when migration fails

2020-06-26 Thread David Hildenbrand
g is still weird, but that has to be sorted out separately. There is nothing to do in the PRECOPY_NOTIFY_COMPLETE case. Add some comments regarding S_DONE handling. Fixes: c13c4153f76d ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: Wei Wang Cc: Alexander Duyck Signed-off-b

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-24 Thread David Hildenbrand
> Am 24.06.2020 um 22:36 schrieb Michael S. Tsirkin : > > On Wed, Jun 24, 2020 at 06:01:02PM +0200, David Hildenbrand wrote: >>> On 24.06.20 17:37, Michael S. Tsirkin wrote: >>> On Wed, Jun 24, 2020 at 05:28:59PM +0200, David Hildenbrand wrote: >>>>>

[virtio-dev] Re: [virtio-comment] [PATCH v4 3/3] content: Document balloon feature free page hints

2020-06-24 Thread David Hildenbrand
On 27.05.20 06:07, Alexander Duyck wrote: > From: Alexander Duyck > > Free page hints allow the balloon driver to provide information on what > pages are not currently in use so that we can avoid the cost of copying > them in migration scenarios. Add a feature description for free page hints > de

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-24 Thread David Hildenbrand
On 24.06.20 17:37, Michael S. Tsirkin wrote: > On Wed, Jun 24, 2020 at 05:28:59PM +0200, David Hildenbrand wrote: >>> So at the high level the idea was simple, we just clear the dirty bit >>> when page is hinted, unless we sent a new command since. Implementation >>

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-24 Thread David Hildenbrand
> So at the high level the idea was simple, we just clear the dirty bit > when page is hinted, unless we sent a new command since. Implementation > was reviewed by migration maintainers. If there's a consensus the code > is written so badly we can't maintain it, maybe we should remove it. > Which p

[virtio-dev] Re: [PATCH 1/2] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-06-22 Thread David Hildenbrand
>free_page_report_cmd_id++; >>> } >> >> Somewhat unrelated cleanup. > > Agreed. I can drop it if preferred. I just took care of it because I > was adding the lock above and below to prevent us from getting into > any wierd states where the command ID might

[virtio-dev] Re: [PATCH 1/2] virtio-balloon: Prevent guest from starting a report when we didn't request one

2020-06-22 Thread David Hildenbrand
On 19.06.20 23:53, Alexander Duyck wrote: > From: Alexander Duyck > > Based on code review it appears possible for the driver to force the device > out of a stopped state when hinting by repeating the last ID it was > provided. Indeed, thanks for noticing. > > Prevent this by only allowing a t

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread David Hildenbrand
> >> 2. Unclear semantics. Alex tried to document what the actual semantics >> of hinted pages are. Assume the following in the guest to a previously >> hinted page >> >> /* page was hinted and is reused now */ >> if (page[x] != Y) >>page[x] == Y; >> /* migration ends, we now run on the d

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread David Hildenbrand
> There are other concerns I had regarding the iothread (e.g., while > reporting is active, virtio_ballloon_get_free_page_hints() is > essentially a busy loop, in contrast to documented - > continue_to_get_hints will always be true). FWIW, I just double checked this and my memory was bad. - --

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread David Hildenbrand
>> >> Ugh, ... >> >> @MST, you might have missed that in another discussion, what's your >> general opinion about removing free page hinting in QEMU (and Linux)? We >> keep finding issues in the QEMU implementation, including non-trivial >> ones, and have to speculate about the actual semantics. I

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread David Hildenbrand
On 18.06.20 17:14, Alexander Duyck wrote: > On Thu, Jun 18, 2020 at 5:54 AM David Hildenbrand wrote: >> >> On 13.06.20 22:07, Alexander Duyck wrote: >>> On Tue, May 26, 2020 at 9:14 PM Alexander Duyck >>> wrote: >>>> >>>> From: Alexander D

[virtio-dev] Re: [PATCH v25 QEMU 3/3] virtio-balloon: Replace free page hinting references to 'report' with 'hint'

2020-06-18 Thread David Hildenbrand
drop the use of the word >> 'report' when referring to Free Page Hinting. So what this patch does is go >> through and replace all instances of 'report' with 'hint" when we are >> referring to free page hinting. >> >> Acked-by: David Hild

[virtio-dev] Re: [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
> Am 11.06.2020 um 13:18 schrieb Michael S. Tsirkin : > > On Thu, Jun 11, 2020 at 01:00:24PM +0200, David Hildenbrand wrote: >>>> I'd like to have this patch in 5.8, with the initial merge of virtio-mem >>>> if possible (so the user space rep

[virtio-dev] Re: [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
>> I'd like to have this patch in 5.8, with the initial merge of virtio-mem >> if possible (so the user space representation of virtio-mem added memory >> resources won't change anymore). > > So my plan is to rebase on top of -rc1 and merge this for rc2 then. > I don't like rebase on top of tip as

[virtio-dev] Re: [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
On 11.06.20 12:32, Pankaj Gupta wrote: >> Virtio-mem managed memory is always detected and added by the virtio-mem >> driver, never using something like the firmware-provided memory map. >> This is the case after an ordinary system reboot, and has to be guaranteed >> after kexec. Especially, virtio

[virtio-dev] [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
stem RAM (virtio_mem) 34800-34fff : System RAM (virtio_mem) [...] Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Cc: teawater Signed-off-by: David Hildenbrand --- Based on latest Linus' tree (and not a tag) because - virtio-mem has just been merged via the vhost tree

[virtio-dev] Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory

2020-06-05 Thread David Hildenbrand
On 05.06.20 12:46, Alex Shi wrote: > > > 在 2020/6/5 下午6:05, David Hildenbrand 写道: >>> I guess I know what's happening here. In case we only have DMA memory >>> when booting, we don't reserve swiotlb buffers. Once we hotplug memory >>> and online ZON

[virtio-dev] Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory

2020-06-05 Thread David Hildenbrand
On 05.06.20 11:36, David Hildenbrand wrote: > On 05.06.20 11:08, David Hildenbrand wrote: >> On 05.06.20 10:55, Alex Shi wrote: >>> >>> >>> 在 2020/1/9 下午9:48, David Hildenbrand 写道: >>>> Ping, >>>> >>>> I'd love to get

[virtio-dev] Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory

2020-06-05 Thread David Hildenbrand
On 05.06.20 11:08, David Hildenbrand wrote: > On 05.06.20 10:55, Alex Shi wrote: >> >> >> 在 2020/1/9 下午9:48, David Hildenbrand 写道: >>> Ping, >>> >>> I'd love to get some feedback on >>> >>> a) The remaining MM bits

[virtio-dev] Re: [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory

2020-06-05 Thread David Hildenbrand
On 05.06.20 10:55, Alex Shi wrote: > > > 在 2020/1/9 下午9:48, David Hildenbrand 写道: >> Ping, >> >> I'd love to get some feedback on >> >> a) The remaining MM bits from MM folks (especially, patch #6 and #8). >> b) The general virtio infrastru

[virtio-dev] Re: [PATCH v4 00/15] virtio-mem: paravirtualized memory

2020-06-02 Thread David Hildenbrand
On 07.05.20 16:01, David Hildenbrand wrote: > This series is based on v5.7-rc4. The patches are located at: > https://github.com/davidhildenbrand/linux.git virtio-mem-v4 > > This is basically a resend of v3 [1], now based on v5.7-rc4 and restested. > One patch was reshuffled

[virtio-dev] Re: [virtio-comment] [PATCH v4 1/3] content: Document balloon feature page poison

2020-05-29 Thread David Hildenbrand
On 29.05.20 18:57, Alexander Duyck wrote: > On Fri, May 29, 2020 at 1:13 AM David Hildenbrand wrote: >> >> On 27.05.20 06:06, Alexander Duyck wrote: >>> From: Alexander Duyck >>> >>> Page poison provides a way for the guest to notify the host that it is

[virtio-dev] Re: [virtio-comment] [PATCH v4 1/3] content: Document balloon feature page poison

2020-05-29 Thread David Hildenbrand
On 27.05.20 06:06, Alexander Duyck wrote: > From: Alexander Duyck > > Page poison provides a way for the guest to notify the host that it is > initializing or poisoning freed pages with some specific poison value. As a > result of this we can infer a couple traits about the guest: > > 1. Free pa

Re: [virtio-dev] Re: [virtio-comment] [PATCH v3 2/3] content: Document balloon feature page poison

2020-05-27 Thread David Hildenbrand
On 27.05.20 08:14, Wei Wang wrote: > On 05/26/2020 11:38 PM, Cornelia Huck wrote: >> On Tue, 26 May 2020 17:28:00 +0200 David Hildenbrand >> wrote: >> >>> On 26.05.20 16:50, Alexander Duyck wrote: >>>> On Tue, May 26, 2020 at 1:24 AM David Hildenbrand

[virtio-dev] Re: [virtio-comment] [PATCH v3 2/3] content: Document balloon feature page poison

2020-05-26 Thread David Hildenbrand
On 26.05.20 16:50, Alexander Duyck wrote: > On Tue, May 26, 2020 at 1:24 AM David Hildenbrand wrote: >> >> On 20.05.20 18:25, Alexander Duyck wrote: >>> On Wed, May 20, 2020 at 2:28 AM David Hildenbrand wrote: >>>> >>>> On 20.05.20 04:02, Al

[virtio-dev] Re: [virtio-comment] [PATCH v3 3/3] content: Document balloon feature free page reporting

2020-05-26 Thread David Hildenbrand
On 20.05.20 04:02, Alexander Duyck wrote: > From: Alexander Duyck > > Free page reporting is a feature that allows the guest to proactively > report unused pages to the host. By making use of this feature is is > possible to reduce the overall memory footprint of the guest in cases where > some s

[virtio-dev] Re: [virtio-comment] [PATCH v3 2/3] content: Document balloon feature page poison

2020-05-26 Thread David Hildenbrand
On 20.05.20 18:25, Alexander Duyck wrote: > On Wed, May 20, 2020 at 2:28 AM David Hildenbrand wrote: >> >> On 20.05.20 04:02, Alexander Duyck wrote: >>> From: Alexander Duyck >>> >>> Page poison provides a way for the guest to notify the host of the cont

[virtio-dev] Re: [virtio-comment] [PATCH v3 2/3] content: Document balloon feature page poison

2020-05-20 Thread David Hildenbrand
On 20.05.20 04:02, Alexander Duyck wrote: > From: Alexander Duyck > > Page poison provides a way for the guest to notify the host of the content > expected to be found in pages when they are added back to the guest after > being discarded. The feature currently doesn't apply to the existing > bal

[virtio-dev] Re: [virtio-comment] [PATCH v2 1/3] content: Document balloon feature free page hints

2020-05-20 Thread David Hildenbrand
On 19.05.20 23:00, Alexander Duyck wrote: > On Tue, May 19, 2020 at 9:09 AM David Hildenbrand wrote: >> >>>> I proposed that the driver MUST reinitialize the pages when reusing >>>> (which is what Linux does), so then this is true. Reuse implies >>>

[virtio-dev] Re: [PATCH v4 00/15] virtio-mem: paravirtualized memory

2020-05-20 Thread David Hildenbrand
On 20.05.20 07:25, teawater wrote: > Hi David, > > Thanks for your work. > I tried this version with cloud-hypervisor master. It worked very well. > > Best, > Hui Hi Hui, thanks for testing! Cheers! -- Thanks, David / dhildenb -

[virtio-dev] Re: [virtio-comment] [PATCH v2 3/3] content: Document balloon feature free page reporting

2020-05-19 Thread David Hildenbrand
> >>> \devicenormative{\subsubsection}{Feature bits}{Device Types / Memory >>> Balloon Device / Feature bits} >>> If the device offers the VIRTIO_BALLOON_F_MUST_TELL_HOST feature >>> bit, and if the driver did not accept this feature bit, the >>> @@ -5101,10 +5110,16 @@ \subsection{Device Init

[virtio-dev] Re: [virtio-comment] [PATCH v2 1/3] content: Document balloon feature free page hints

2020-05-19 Thread David Hildenbrand
>> I proposed that the driver MUST reinitialize the pages when reusing >> (which is what Linux does), so then this is true. Reuse implies >> initializing, implies modification. It's somewhat simpler than what you >> propose, leaving the case open where the driver would reuse pages by >> only readin

[virtio-dev] Re: [virtio-comment] [PATCH v2 3/3] content: Document balloon feature free page reporting

2020-05-19 Thread David Hildenbrand
On 15.05.20 19:33, Alexander Duyck wrote: > From: Alexander Duyck > > Free page reporting is a feature that allows the guest to proactively > report unused pages to the host. By making use of this feature is is > possible to reduce the overall memory footprint of the guest in cases where > some s

[virtio-dev] Re: [virtio-comment] [PATCH v2 1/3] content: Document balloon feature free page hints

2020-05-19 Thread David Hildenbrand
[...] >>> +\begin{description} >>> +\item[VIRTIO_BALLOON_CMD_ID_STOP (0)] Any command ID previously supplied by >>> + the device is invalid. The driver should halt all hinting until a new >>> + command ID is supplied. >> >> Maybe "The driver should stop hinting free pages, but should not reuse >>

[virtio-dev] Re: [virtio-comment] [PATCH v2 1/3] content: Document balloon feature free page hints

2020-05-18 Thread David Hildenbrand
>> + >> +\devicenormative{\paragraph}{Free Page Hinting}{Device Types / Memory >> Balloon Device / Device Operation / Free Page Hinting} >> + >> +Normative statements in this section apply if the >> +VIRTIO_BALLOON_F_FREE_PAGE_HINT feature has been negotiated. >> + >> +The device MUST set \field

[virtio-dev] Re: [virtio-comment] [PATCH v2 1/3] content: Document balloon feature free page hints

2020-05-18 Thread David Hildenbrand
On 15.05.20 19:33, Alexander Duyck wrote: > From: Alexander Duyck > > Free page hints allow the balloon driver to provide information on what > pages are not currently in use so that we can avoid the cost of copying > them in migration scenarios. Add a feature description for free page hints > de

[virtio-dev] Re: [virtio-comment] [PATCH 2/3] content: Document balloon feature page poison

2020-05-15 Thread David Hildenbrand
On 08.05.20 19:16, Alexander Duyck wrote: > From: Alexander Duyck > > Page poison provides a way for the guest to notify the host of the content > expected to be found in pages when they are added back to the guest after > being discarded. The feature currently doesn't apply to the existing > bal

[virtio-dev] Re: [PATCH 0/3] virtio-spec: Add documentation for recently added balloon features

2020-05-15 Thread David Hildenbrand
On 15.05.20 19:06, Alexander Duyck wrote: > On Mon, May 11, 2020 at 5:44 AM David Hildenbrand wrote: >> >> On 11.05.20 14:38, Cornelia Huck wrote: >>> On Fri, 08 May 2020 10:16:14 -0700 >>> Alexander Duyck wrote: >>> >>>> This patch set i

[virtio-dev] [PATCH v4 16/15] virtio-mem: Don't rely on implicit compiler padding for requests

2020-05-15 Thread David Hildenbrand
The compiler will add padding after the last member, make that explicit. The size of a request is always 24 bytes. The size of a response always 10 bytes. Add compile-time checks. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Cc: teawater Signed-off-by: David Hildenbrand --- Something

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 13:47, David Hildenbrand wrote: > On 14.05.20 13:10, David Hildenbrand wrote: >> On 14.05.20 12:12, David Hildenbrand wrote: >>> On 14.05.20 12:02, teawater wrote: >>>> >>>> >>>>> 2020年5月14日 16:48,David Hildenbrand 写道: >&

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 13:10, David Hildenbrand wrote: > On 14.05.20 12:12, David Hildenbrand wrote: >> On 14.05.20 12:02, teawater wrote: >>> >>> >>>> 2020年5月14日 16:48,David Hildenbrand 写道: >>>> >>>> On 14.05.20 08:44, teawater wrote: &g

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 12:12, David Hildenbrand wrote: > On 14.05.20 12:02, teawater wrote: >> >> >>> 2020年5月14日 16:48,David Hildenbrand 写道: >>> >>> On 14.05.20 08:44, teawater wrote: >>>> Hi David, >>>> >>>> I got a kernel warn

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 12:02, teawater wrote: > > >> 2020年5月14日 16:48,David Hildenbrand 写道: >> >> On 14.05.20 08:44, teawater wrote: >>> Hi David, >>> >>> I got a kernel warning with v2 and v3. >> >> Hi Hui, >> >> thanks for

Re: [virtio-dev] [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-14 Thread David Hildenbrand
On 14.05.20 08:44, teawater wrote: > Hi David, > > I got a kernel warning with v2 and v3. Hi Hui, thanks for playing with the latest versions. Surprisingly, I can reproduce even by hotplugging a DIMM instead as well - that's good, so it's not related to virtio-mem, lol. Seems to be some QEMU set

[virtio-dev] Re: [RFC v3 for QEMU] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-05-13 Thread David Hildenbrand
On 12.05.20 11:41, Hui Zhu wrote: This description needs an overhaul, it's hard to parse. > If the guest kernel has many fragmentation pages, use virtio_balloon > will split THP of QEMU when it calls MADV_DONTNEED madvise to release > the balloon pages. This is very unclear and confusing. You wi

[virtio-dev] Re: [PATCH 0/3] virtio-spec: Add documentation for recently added balloon features

2020-05-11 Thread David Hildenbrand
On 11.05.20 14:38, Cornelia Huck wrote: > On Fri, 08 May 2020 10:16:14 -0700 > Alexander Duyck wrote: > >> This patch set is meant to add documentation for balloon features that have >> been recently added to the Linux kernel[1,2] and that we are currently >> working on adding to QEMU[3]. >> >> C

[virtio-dev] Re: [PATCH v23 QEMU 0/5] virtio-balloon: add support for page poison reporting and free page reporting

2020-05-08 Thread David Hildenbrand
> Am 08.05.2020 um 19:31 schrieb Alexander Duyck : > > I just wanted to follow up since it has been a little over a week > since I submitted this and I haven't heard anything back. It looks > like the linux-headers patches can be dropped since the headers appear > to have been synced. I was wo

[virtio-dev] [PATCH v4 09/15] virtio-mem: Offline and remove completely unplugged memory blocks

2020-05-07 Thread David Hildenbrand
oczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 47 + 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index b0b41c73ce89..a2edb87e5ed8 100644 --- a/dr

[virtio-dev] [PATCH v4 15/15] virtio-mem: Try to unplug the complete online memory block first

2020-05-07 Thread David Hildenbrand
ed as a whole. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 88 - 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/vir

[virtio-dev] [PATCH v4 12/15] virtio-mem: Drop manual check for already present memory

2020-05-07 Thread David Hildenbrand
Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 55 - 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index 80cdb9e6b3c4..8dd57b61b09b 100644 --- a/drivers/virti

[virtio-dev] [PATCH v4 11/15] virtio-mem: Add parent resource for all added "System RAM"

2020-05-07 Thread David Hildenbrand
f : System RAM 34000-347ff : System RAM 34800-34fff : System RAM [...] Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 52 - 1 file changed, 51 i

[virtio-dev] [PATCH v4 10/15] virtio-mem: Better retry handling

2020-05-07 Thread David Hildenbrand
Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index a2edb87e5ed8..eb4c1

[virtio-dev] [PATCH v4 13/15] virtio-mem: Unplug subblocks right-to-left

2020-05-07 Thread David Hildenbrand
We unplug blocks right-to-left, let's also unplug subblocks within a block right-to-left. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 38 - 1 file changed, 16 insertions(+

[virtio-dev] [PATCH v4 14/15] virtio-mem: Use -ETXTBSY as error code if the device is busy

2020-05-07 Thread David Hildenbrand
Let's be able to distinguish if the device or if memory is busy. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/virtio

[virtio-dev] [PATCH v4 04/15] virtio-mem: Paravirtualized memory hotunplug part 1

2020-05-07 Thread David Hildenbrand
n Cc: Dan Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 116 +++- 1 file changed, 114 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/driv

[virtio-dev] [PATCH v4 07/15] virtio-mem: Allow to offline partially unplugged memory blocks

2020-05-07 Thread David Hildenbrand
c: Igor Mammedov Cc: Dave Young Cc: Andrew Morton Cc: Dan Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 68 - 1 file changed, 67 insertions(+), 1 deletion(-) diff --

[virtio-dev] [PATCH v4 05/15] virtio-mem: Paravirtualized memory hotunplug part 2

2020-05-07 Thread David Hildenbrand
mmedov Cc: Dave Young Cc: Andrew Morton Cc: Dan Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Cc: Mel Gorman Cc: Mike Rapoport Cc: Alexander Duyck Cc: Alexander Potapenko Signed-off-by: David Hildenbrand --- drivers/virtio/Kconfig | 1 + drivers/virtio/virtio_m

[virtio-dev] [PATCH v4 08/15] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-05-07 Thread David Hildenbrand
vices (esp. find_memory_block() and device_offline()) and the device hotplug lock. To keep things simple, allow to only work on a single memory block. Acked-by: Michal Hocko Tested-by: Pankaj Gupta Acked-by: Andrew Morton Cc: Andrew Morton Cc: David Hildenbrand Cc: Oscar Salvador Cc: Michal

[virtio-dev] [PATCH v4 06/15] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-05-07 Thread David Hildenbrand
Qian Cai Cc: Pingfan Liu Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 10 + mm/memory_hotplug.c| 44 +- mm/page_alloc.c| 24 + mm/page_isolation.c| 9 4 files change

[virtio-dev] [PATCH v4 02/15] MAINTAINERS: Add myself as virtio-mem maintainer

2020-05-07 Thread David Hildenbrand
Let's make sure patches/bug reports find the right person. Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2926327e4976..014bbf5897c2 100644 --- a/MAINTAINERS ++

[virtio-dev] [PATCH v4 01/15] virtio-mem: Paravirtualized memory hotplug

2020-05-07 Thread David Hildenbrand
Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: linux-a...@vger.kernel.org Signed-off-by: David Hildenbrand --- drivers/virtio/Kconfig | 16 + drivers/virtio/Makefile

[virtio-dev] [PATCH v4 00/15] virtio-mem: paravirtualized memory

2020-05-07 Thread David Hildenbrand
er_from_errno() instead of notifier_to_errno() in notifier -- More reliable check for added memory when unloading the driver - "virtio-mem: Allow to specify an ACPI PXM as nid" -- Also print the nid - Added patch #11-#15 David Hildenbrand (15): virtio-mem: Paravirtualized memory hotpl

[virtio-dev] [PATCH v4 03/15] virtio-mem: Allow to specify an ACPI PXM as nid

2020-05-07 Thread David Hildenbrand
a Cc: Len Brown Cc: linux-a...@vger.kernel.org Signed-off-by: David Hildenbrand --- drivers/acpi/numa/srat.c| 1 + drivers/virtio/virtio_mem.c | 39 +++-- include/uapi/linux/virtio_mem.h | 10 - 3 files changed, 47 insertions(+), 3 deletions(-)

[virtio-dev] Re: [PATCH v3 07/15] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-05-07 Thread David Hildenbrand
On 07.05.20 14:11, Michael S. Tsirkin wrote: > On Thu, May 07, 2020 at 01:37:30PM +0200, David Hildenbrand wrote: >> On 07.05.20 13:34, Michael S. Tsirkin wrote: >>> On Thu, May 07, 2020 at 01:33:23PM +0200, David Hildenbrand wrote: >>>>>> I get: >>>>

[virtio-dev] Re: [PATCH v3 07/15] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-05-07 Thread David Hildenbrand
On 07.05.20 13:34, Michael S. Tsirkin wrote: > On Thu, May 07, 2020 at 01:33:23PM +0200, David Hildenbrand wrote: >>>> I get: >>>> >>>> error: sha1 information is lacking or useless (mm/memory_hotplug.c). >>>> error: could not build fake ancesto

[virtio-dev] Re: [PATCH v3 07/15] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-05-07 Thread David Hildenbrand
>> I get: >> >> error: sha1 information is lacking or useless (mm/memory_hotplug.c). >> error: could not build fake ancestor >> >> which version is this against? Pls post patches on top of some tag >> in Linus' tree if possible. > > As the cover states, latest linux-next. To be precise > > commit

[virtio-dev] Re: [PATCH v3 07/15] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-05-07 Thread David Hildenbrand
On 07.05.20 12:46, Michael S. Tsirkin wrote: > On Thu, May 07, 2020 at 12:31:11PM +0200, David Hildenbrand wrote: >> virtio-mem wants to offline and remove a memory block once it unplugged >> all subblocks (e.g., using alloc_contig_range()). Let's provide >> an interfac

[virtio-dev] Re: [PATCH v3 10/15] MAINTAINERS: Add myself as virtio-mem maintainer

2020-05-07 Thread David Hildenbrand
On 07.05.20 12:47, Michael S. Tsirkin wrote: > On Thu, May 07, 2020 at 12:31:14PM +0200, David Hildenbrand wrote: >> Let's make sure patches/bug reports find the right person. >> >> Cc: "Michael S. Tsirkin" >> Signed-off-by: David Hildenbrand > >

[virtio-dev] Re: [PATCH v3 00/15] virtio-mem: paravirtualized memory

2020-05-07 Thread David Hildenbrand
On 07.05.20 12:48, Michael S. Tsirkin wrote: > On Thu, May 07, 2020 at 12:31:04PM +0200, David Hildenbrand wrote: >> This series is based on latest linux-next. The patches are located at: >> https://github.com/davidhildenbrand/linux.git virtio-mem-v3 >> >> Patch #1

[virtio-dev] [PATCH v3 13/15] virtio-mem: Unplug subblocks right-to-left

2020-05-07 Thread David Hildenbrand
We unplug blocks right-to-left, let's also unplug subblocks within a block right-to-left. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 38 - 1 file changed, 16 insertions(+

[virtio-dev] [PATCH v3 15/15] virtio-mem: Try to unplug the complete online memory block first

2020-05-07 Thread David Hildenbrand
ed as a whole. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 88 - 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/vir

[virtio-dev] [PATCH v3 14/15] virtio-mem: Use -ETXTBSY as error code if the device is busy

2020-05-07 Thread David Hildenbrand
Let's be able to distinguish if the device or if memory is busy. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/virtio

[virtio-dev] [PATCH v3 12/15] virtio-mem: Drop manual check for already present memory

2020-05-07 Thread David Hildenbrand
Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 55 - 1 file changed, 12 insertions(+), 43 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index 80cdb9e6b3c4..8dd57b61b09b 100644 --- a/drivers/virti

[virtio-dev] [PATCH v3 10/15] MAINTAINERS: Add myself as virtio-mem maintainer

2020-05-07 Thread David Hildenbrand
Let's make sure patches/bug reports find the right person. Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4d43ea5468b5..ad2b34f4dd66 100644 --- a/MAINTAINERS ++

[virtio-dev] [PATCH v3 11/15] virtio-mem: Add parent resource for all added "System RAM"

2020-05-07 Thread David Hildenbrand
f : System RAM 34000-347ff : System RAM 34800-34fff : System RAM [...] Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 52 - 1 file changed, 51 i

[virtio-dev] [PATCH v3 09/15] virtio-mem: Better retry handling

2020-05-07 Thread David Hildenbrand
Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index a2edb87e5ed8..eb4c1

[virtio-dev] [PATCH v3 06/15] virtio-mem: Allow to offline partially unplugged memory blocks

2020-05-07 Thread David Hildenbrand
c: Igor Mammedov Cc: Dave Young Cc: Andrew Morton Cc: Dan Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 68 - 1 file changed, 67 insertions(+), 1 deletion(-) diff --

[virtio-dev] [PATCH v3 07/15] mm/memory_hotplug: Introduce offline_and_remove_memory()

2020-05-07 Thread David Hildenbrand
vices (esp. find_memory_block() and device_offline()) and the device hotplug lock. To keep things simple, allow to only work on a single memory block. Acked-by: Michal Hocko Tested-by: Pankaj Gupta Cc: Andrew Morton Cc: David Hildenbrand Cc: Oscar Salvador Cc: Michal Hocko Cc: Pavel Tatashi

[virtio-dev] [PATCH v3 08/15] virtio-mem: Offline and remove completely unplugged memory blocks

2020-05-07 Thread David Hildenbrand
oczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 47 + 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index b0b41c73ce89..a2edb87e5ed8 100644 --- a/dr

[virtio-dev] [PATCH v3 05/15] mm: Allow to offline unmovable PageOffline() pages via MEM_GOING_OFFLINE

2020-05-07 Thread David Hildenbrand
n Liu Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 10 + mm/memory_hotplug.c| 44 +- mm/page_alloc.c| 24 + mm/page_isolation.c| 9 4 files changed, 77 insertions(+), 10 dele

[virtio-dev] [PATCH v3 02/15] virtio-mem: Allow to specify an ACPI PXM as nid

2020-05-07 Thread David Hildenbrand
a Cc: Len Brown Cc: linux-a...@vger.kernel.org Signed-off-by: David Hildenbrand --- drivers/acpi/numa/srat.c| 1 + drivers/virtio/virtio_mem.c | 39 +++-- include/uapi/linux/virtio_mem.h | 10 - 3 files changed, 47 insertions(+), 3 deletions(-)

[virtio-dev] [PATCH v3 03/15] virtio-mem: Paravirtualized memory hotunplug part 1

2020-05-07 Thread David Hildenbrand
n Cc: Dan Williams Cc: Pavel Tatashin Cc: Stefan Hajnoczi Cc: Vlastimil Babka Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 116 +++- 1 file changed, 114 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/driv

  1   2   3   >