All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Wang, Wei W" <wei.w.wang@intel.com>
Cc: "virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"liliang.opensource@gmail.com" <liliang.opensource@gmail.com>,
	"yang.zhang.wz@gmail.com" <yang.zhang.wz@gmail.com>,
	"quan.xu0@gmail.com" <quan.xu0@gmail.com>,
	"nilal@redhat.com" <nilal@redhat.com>,
	"riel@redhat.com" <riel@redhat.com>,
	"huangzhichao@huawei.com" <huangzhichao@huawei.com>
Subject: [virtio-dev] Re: [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
Date: Thu, 5 Apr 2018 17:03:40 +0300	[thread overview]
Message-ID: <20180405170248-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <286AC319A985734F985F78AFA26841F7394A7F3B@shsmsx102.ccr.corp.intel.com>

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.

-- 
MST

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Wang, Wei W" <wei.w.wang@intel.com>
Cc: "virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"liliang.opensource@gmail.com" <liliang.opensource@gmail.com>,
	"yang.zhang.wz@gmail.com" <yang.zhang.wz@gmail.com>,
	"quan.xu0@gmail.com" <quan.xu0@gmail.com>,
	"nilal@redhat.com" <nilal@redhat.com>,
	"riel@redhat.com" <riel@redhat.com>,
	"huangzhichao@huawei.com" <huangzhichao@huawei.com>
Subject: Re: [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
Date: Thu, 5 Apr 2018 17:03:40 +0300	[thread overview]
Message-ID: <20180405170248-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <286AC319A985734F985F78AFA26841F7394A7F3B@shsmsx102.ccr.corp.intel.com>

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.

-- 
MST

  parent reply	other threads:[~2018-04-05 14:03 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 16:10 [virtio-dev] [PATCH v30 0/4] Virtio-balloon: support free page reporting Wei Wang
2018-04-03 16:10 ` Wei Wang
2018-04-03 16:10 ` Wei Wang
2018-04-03 16:10 ` [PATCH v30 1/4] mm: support reporting free page blocks Wei Wang
2018-04-03 16:10 ` [virtio-dev] " Wei Wang
2018-04-03 16:10   ` Wei Wang
2018-04-03 16:10 ` [virtio-dev] [PATCH v30 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Wei Wang
2018-04-03 16:10   ` Wei Wang
2018-04-03 16:10   ` Wei Wang
2018-04-03 18:47   ` [virtio-dev] " Michael S. Tsirkin
2018-04-03 18:47     ` Michael S. Tsirkin
2018-04-04  2:07     ` [virtio-dev] " Wei Wang
2018-04-04  2:07       ` Wei Wang
2018-04-04 14:07       ` [virtio-dev] " Michael S. Tsirkin
2018-04-04 14:07         ` Michael S. Tsirkin
2018-04-04 14:07         ` Michael S. Tsirkin
2018-04-05  0:30         ` Wang, Wei W
2018-04-05  0:30         ` [virtio-dev] " Wang, Wei W
2018-04-05  0:30           ` Wang, Wei W
2018-04-05  1:12           ` [virtio-dev] " Michael S. Tsirkin
2018-04-05  1:12             ` Michael S. Tsirkin
2018-04-05  2:05             ` Wang, Wei W
2018-04-05  2:05             ` [virtio-dev] " Wang, Wei W
2018-04-05  2:05               ` Wang, Wei W
2018-04-05 14:03               ` Michael S. Tsirkin
2018-04-05 14:03               ` Michael S. Tsirkin [this message]
2018-04-05 14:03                 ` Michael S. Tsirkin
2018-04-05 15:47                 ` Wang, Wei W
2018-04-05 15:47                 ` [virtio-dev] " Wang, Wei W
2018-04-05 15:47                   ` Wang, Wei W
2018-04-05 18:30                   ` [virtio-dev] " Michael S. Tsirkin
2018-04-05 18:30                     ` Michael S. Tsirkin
2018-04-06  0:11                     ` [virtio-dev] " Wang, Wei W
2018-04-06  0:11                       ` Wang, Wei W
2018-04-06  0:11                     ` Wang, Wei W
2018-04-05 18:30                   ` Michael S. Tsirkin
2018-04-05  1:12           ` Michael S. Tsirkin
2018-04-04  2:07     ` Wei Wang
2018-04-03 18:47   ` Michael S. Tsirkin
2018-04-03 16:10 ` [virtio-dev] [PATCH v30 3/4] mm/page_poison: expose page_poisoning_enabled to kernel modules Wei Wang
2018-04-03 16:10   ` Wei Wang
2018-04-03 16:10 ` Wei Wang
2018-04-03 16:10 ` [virtio-dev] [PATCH v30 4/4] virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON Wei Wang
2018-04-03 16:10   ` Wei Wang
2018-04-03 16:10 ` 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=20180405170248-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=huangzhichao@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=liliang.opensource@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=nilal@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=quan.xu0@gmail.com \
    --cc=riel@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wei.w.wang@intel.com \
    --cc=yang.zhang.wz@gmail.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.