LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: "Wang, Wei W" <email@example.com> To: "Michael S. Tsirkin" <firstname.lastname@example.org> Cc: "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org>, "email@example.com" <firstname.lastname@example.org> Subject: RE: [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Date: Thu, 5 Apr 2018 15:47:28 +0000 [thread overview] Message-ID: <286AC319A985734F985F78AFA26841F7394A889E@shsmsx102.ccr.corp.intel.com> (raw) In-Reply-To: <email@example.com> On Thursday, April 5, 2018 10:04 PM, Michael S. Tsirkin wrote: > On Thu, Apr 05, 2018 at 02:05:03AM +0000, Wang, Wei W wrote: > > On Thursday, April 5, 2018 9:12 AM, Michael S. Tsirkin wrote: > > > On Thu, Apr 05, 2018 at 12:30:27AM +0000, Wang, Wei W wrote: > > > > On Wednesday, April 4, 2018 10:08 PM, Michael S. Tsirkin wrote: > > > > > On Wed, Apr 04, 2018 at 10:07:51AM +0800, Wei Wang wrote: > > > > > > On 04/04/2018 02:47 AM, Michael S. Tsirkin wrote: > > > > > > > On Wed, Apr 04, 2018 at 12:10:03AM +0800, Wei Wang wrote: > > > > I'm afraid the driver couldn't be aware if the added hints are > > > > stale or not, > > > > > > > > > No - I mean that driver has code that compares two values and stops > > > reporting. Can one of the values be stale? > > > > The driver compares "vb->cmd_id_use != vb->cmd_id_received" to decide > > if it needs to stop reporting hints, and cmd_id_received is what the > > driver reads from host (host notifies the driver to read for the > > latest value). If host sends a new cmd id, it will notify the guest to > > read again. I'm not sure how that could be a stale cmd id (or maybe I > > misunderstood your point here?) > > > > Best, > > Wei > > The comparison is done in one thread, the update in another one. I think this isn't something that could be solved by adding a lock, unless host waits for the driver's ACK about finishing the update (this is not agreed in the QEMU part discussion). Actually virtio_balloon has F_IOMMU_PLATFORM disabled, maybe we don't need to worry about that using DMA api case (we only have gpa added to the vq, and having some entries stay in the vq seems fine). For this feature, I think it would not work with F_IOMMU enabled either. If there is any further need (I couldn't think of a need so far), I think we could consider to let host inject a vq interrupt at some point, and then the driver handler can do the virtqueue_get_buf work. Best, Wei
next prev parent reply other threads:[~2018-04-05 15:47 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-03 16:10 [PATCH v30 0/4] Virtio-balloon: support free page reporting Wei Wang 2018-04-03 16:10 ` [PATCH v30 1/4] mm: support reporting free page blocks Wei Wang 2018-04-03 16:10 ` [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Wei Wang 2018-04-03 18:47 ` Michael S. Tsirkin 2018-04-04 2:07 ` Wei Wang 2018-04-04 14:07 ` Michael S. Tsirkin 2018-04-05 0:30 ` Wang, Wei W 2018-04-05 1:12 ` Michael S. Tsirkin 2018-04-05 2:05 ` Wang, Wei W 2018-04-05 14:03 ` Michael S. Tsirkin 2018-04-05 15:47 ` Wang, Wei W [this message] 2018-04-05 18:30 ` Michael S. Tsirkin 2018-04-06 0:11 ` Wang, Wei W 2018-04-03 16:10 ` [PATCH v30 3/4] mm/page_poison: expose page_poisoning_enabled to kernel modules Wei Wang 2018-04-03 16:10 ` [PATCH v30 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON Wei Wang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=286AC319A985734F985F78AFA26841F7394A889E@shsmsx102.ccr.corp.intel.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).