qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Write cache enable from guest at runtime
@ 2011-03-14 17:07 Stefan Hajnoczi
  2011-03-14 17:16 ` [Qemu-devel] " Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2011-03-14 17:07 UTC (permalink / raw)
  To: Christoph Hellwig, Kevin Wolf, Prerna Saxena, Anthony Liguori; +Cc: qemu-devel

Hi Christoph,
I have written up thoughts on write cache enable, including a
workaround to change O_SYNC on a file without kernel changes:

http://wiki.qemu.org/Features/WriteCacheEnable

Guest ability to control write cache enable is useful and I'd like to
see it in QEMU soon.  Any thoughts about what I've posted?  Care to
submit your patches?

Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: Write cache enable from guest at runtime
  2011-03-14 17:07 [Qemu-devel] Write cache enable from guest at runtime Stefan Hajnoczi
@ 2011-03-14 17:16 ` Christoph Hellwig
  2011-03-14 19:15   ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2011-03-14 17:16 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, Anthony Liguori, qemu-devel, Christoph Hellwig,
	Prerna Saxena

On Mon, Mar 14, 2011 at 05:07:57PM +0000, Stefan Hajnoczi wrote:
> Hi Christoph,
> I have written up thoughts on write cache enable, including a
> workaround to change O_SYNC on a file without kernel changes:
> 
> http://wiki.qemu.org/Features/WriteCacheEnable
> 
> Guest ability to control write cache enable is useful and I'd like to
> see it in QEMU soon.  Any thoughts about what I've posted?  Care to
> submit your patches?

I have patches using Prerna's close and reopen method almost ready for posting.
Still fighting a bit with the new virtio code to wire it up.

Unlike your variant I actually added a generic change config request type,
which allows to re-use it for other runtime controllable features later.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: Write cache enable from guest at runtime
  2011-03-14 17:16 ` [Qemu-devel] " Christoph Hellwig
@ 2011-03-14 19:15   ` Stefan Hajnoczi
  2011-03-15 10:50     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2011-03-14 19:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Kevin Wolf, Anthony Liguori, qemu-devel, Prerna Saxena

On Mon, Mar 14, 2011 at 5:16 PM, Christoph Hellwig <hch@lst.de> wrote:
> On Mon, Mar 14, 2011 at 05:07:57PM +0000, Stefan Hajnoczi wrote:
>> Hi Christoph,
>> I have written up thoughts on write cache enable, including a
>> workaround to change O_SYNC on a file without kernel changes:
>>
>> http://wiki.qemu.org/Features/WriteCacheEnable
>>
>> Guest ability to control write cache enable is useful and I'd like to
>> see it in QEMU soon.  Any thoughts about what I've posted?  Care to
>> submit your patches?
>
> I have patches using Prerna's close and reopen method almost ready for posting.
> Still fighting a bit with the new virtio code to wire it up.
>
> Unlike your variant I actually added a generic change config request type,
> which allows to re-use it for other runtime controllable features later.

Sounds like a good idea.  Feel free to post the patches RFC and I or
someone else can debug and polish them if you don't have time.

Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: Write cache enable from guest at runtime
  2011-03-14 19:15   ` Stefan Hajnoczi
@ 2011-03-15 10:50     ` Christoph Hellwig
  2011-03-15 11:21       ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2011-03-15 10:50 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, Anthony Liguori, qemu-devel, Christoph Hellwig,
	Prerna Saxena

On Mon, Mar 14, 2011 at 07:15:14PM +0000, Stefan Hajnoczi wrote:
> Sounds like a good idea.  Feel free to post the patches RFC and I or
> someone else can debug and polish them if you don't have time.

By looking at your document and doing what you recommend against I think I
got a much simpler solution than what I had before.

I didn't know we could actually write to the config space.  The vpcu
synchronous behaviour is not a problem as it's done seldomly, and we
can trivially check against errors by reading the value back.

I've just started building this variant, and it seems surprisingly simple.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: Write cache enable from guest at runtime
  2011-03-15 10:50     ` Christoph Hellwig
@ 2011-03-15 11:21       ` Stefan Hajnoczi
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2011-03-15 11:21 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Kevin Wolf, Anthony Liguori, qemu-devel, Prerna Saxena

On Tue, Mar 15, 2011 at 10:50 AM, Christoph Hellwig <hch@lst.de> wrote:
> On Mon, Mar 14, 2011 at 07:15:14PM +0000, Stefan Hajnoczi wrote:
>> Sounds like a good idea.  Feel free to post the patches RFC and I or
>> someone else can debug and polish them if you don't have time.
>
> By looking at your document and doing what you recommend against I think I
> got a much simpler solution than what I had before.
>
> I didn't know we could actually write to the config space.  The vpcu
> synchronous behaviour is not a problem as it's done seldomly, and we
> can trivially check against errors by reading the value back.
>
> I've just started building this variant, and it seems surprisingly simple.

I didn't think about the just reading the value back.

What do you think about reopening the file via /proc/$pid/fd/$old_fd?
I wrote a test and had a look at the proc fd code.  It seems to work
fine and doesn't require an O_SYNC runtime change kernel patch.  It
allows us to fall back to the old fd if the new file cannot be opened
and it works even when the old file has been deleted.

Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-15 11:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 17:07 [Qemu-devel] Write cache enable from guest at runtime Stefan Hajnoczi
2011-03-14 17:16 ` [Qemu-devel] " Christoph Hellwig
2011-03-14 19:15   ` Stefan Hajnoczi
2011-03-15 10:50     ` Christoph Hellwig
2011-03-15 11:21       ` Stefan Hajnoczi

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).