From: Wei Wang <wei.w.wang@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
linux-mm@kvack.org, mhocko@kernel.org, akpm@linux-foundation.org,
pbonzini@redhat.com, liliang.opensource@gmail.com,
yang.zhang.wz@gmail.com, quan.xu0@gmail.com, nilal@redhat.com,
riel@redhat.com
Subject: Re: [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
Date: Thu, 25 Jan 2018 17:45:19 +0800 [thread overview]
Message-ID: <5A69A72F.4000104@intel.com> (raw)
In-Reply-To: <20180124183349-mutt-send-email-mst@kernel.org>
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 to caller instead and handle it
>> there.
>>
>> You can then avoid sprinking the check for the feature bit
>> all over the code.
>>
>
> One thing I don't like about this one is that the previous request
> will still try to run to completion.
>
> And it all seems pretty complex.
>
> How about:
> - pass cmd id to a queued work
> - queued work gets that cmd id, stores a copy and uses that,
> re-checking periodically - stop if cmd id changes:
> will replace report_free_page too since that's set to
> stop.
>
> This means you do not reuse the queued cmd id also
> for the buffer - which is probably for the best.
Thanks for the suggestion. Please have a check how it's implemented in v25.
Just a little reminder that work queue has internally ensured that there
is no re-entrant of the same queued function.
Best,
Wei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2018-01-25 9:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 10:42 [PATCH v24 0/2] Virtio-balloon: support free page reporting Wei Wang
2018-01-24 10:42 ` [PATCH v24 1/2] mm: support reporting free page blocks Wei Wang
2018-01-25 13:41 ` Michael S. Tsirkin
2018-01-25 14:56 ` Pankaj Gupta
2018-01-25 17:31 ` Michael S. Tsirkin
2018-01-26 3:29 ` Wei Wang
2018-01-26 15:00 ` Michael S. Tsirkin
2018-01-26 21:43 ` Michael S. Tsirkin
2018-01-27 13:13 ` Wang, Wei W
2018-01-27 14:00 ` Wang, Wei W
2018-01-24 10:42 ` [PATCH v24 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Wei Wang
2018-01-24 17:15 ` Michael S. Tsirkin
2018-01-25 3:32 ` Wei Wang
2018-01-25 11:28 ` Tetsuo Handa
2018-01-25 12:55 ` Wei Wang
2018-02-01 19:14 ` Michael S. Tsirkin
2018-01-25 9:45 ` Wei Wang [this message]
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=5A69A72F.4000104@intel.com \
--to=wei.w.wang@intel.com \
--cc=akpm@linux-foundation.org \
--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=mst@redhat.com \
--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=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 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).