[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: Extending virtio_console to support multiple ports
From: |
Michael Ellerman |
Subject: |
[Qemu-devel] Re: Extending virtio_console to support multiple ports |
Date: |
Thu, 27 Aug 2009 15:04:45 +1000 |
On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote:
> [cc'ing some people who have made some commits in hvc_console.c]
>
> On (Wed) Aug 26 2009 [16:57:18], Amit Shah wrote:
> > On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote:
> > >
> > > Hello all,
> > >
> > > Here is a new iteration of the patch series that implements a
> > > transport for guest and host communications.
> > >
> > > The code has been updated to reuse the virtio-console device instead
> > > of creating a new virtio-serial device.
> >
> > And the problem now is that hvc calls the put_chars function with
> > spinlocks held and we now allocate pages in send_buf(), called from
> > put_chars.
> >
> > A few solutions:
>
> [snip]
>
> > - Convert hvc's usage of spinlocks to mutexes. I've no idea how this
> > will play out; I'm no expert here. But I did try doing this and so far
> > it all looks OK. No lockups, lockdep warnings, nothing. I have full
> > debugging enabled. But this doesn't mean it's right.
>
> So just to test this further I added the capability to have more than
> one hvc console spawn from virtio_console, created two consoles and did
> a 'cat' of a file in each of the virtio-consoles. It's been running for
> half an hour now without any badness. No spew in debug logs too.
>
> I also checked the code in hvc_console.c that takes the spin_locks.
> Nothing there that runs from (or needs to run from) interrupt context.
> So the change to mutexes does seem reasonable. Also, the spinlock code
> was added really long back -- git blame shows Linus' first git commit
> introduced them in the git history, so it's pure legacy baggage.
I won't tell Ryan you called his code "pure legacy baggage" if you
don't ;)
http://git.kernel.org/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commitdiff;h=d450b4ae023fb4be175389c18f4f87677da03020
cheers
signature.asc
Description: This is a digitally signed message part
- [Qemu-devel] [PATCH 2/3] virtio-console: rename dvq to ovq, (continued)
- [Qemu-devel] [PATCH 3/3] virtio-console: Add interface for generic guest-host communication, Amit Shah, 2009/08/25
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/26
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/26
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Benjamin Herrenschmidt, 2009/08/27
- Re: [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/27
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Alan Cox, 2009/08/28
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Benjamin Herrenschmidt, 2009/08/27
- [Qemu-devel] [PATCH] hvc_console: provide (un)locked version for hvc_resize(), Hendrik Brueckner, 2009/08/28
- Re: [Qemu-devel] Re: Extending virtio_console to support multiple ports, Jamie Lokier, 2009/08/28
- [Qemu-devel] Re: Extending virtio_console to support multiple ports,
Michael Ellerman <=
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/27
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Ryan Arnold, 2009/08/28
[Qemu-devel] Re: Extending virtio_console to support multiple ports, Anthony Liguori, 2009/08/28
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/30
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Anthony Liguori, 2009/08/30
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/30
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Anthony Liguori, 2009/08/31
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/31
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Anthony Liguori, 2009/08/31
- [Qemu-devel] Re: Extending virtio_console to support multiple ports, Amit Shah, 2009/08/31