public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	borntraeger@de.ibm.com, linux-kernel@vger.kernel.org,
	miltonm@bga.com, linuxppc-dev@ozlabs.org,
	brueckner@linux.vnet.ibm.com, alan@linux.intel.com,
	Ryan Arnold <rsa@us.ibm.com>
Subject: Re: Extending virtio_console to support multiple ports
Date: Thu, 27 Aug 2009 15:04:45 +1000	[thread overview]
Message-ID: <1251349485.6267.6.camel@concordia> (raw)
In-Reply-To: <20090826154552.GA31910@amit-x200.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2009-08-27  5:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1251181044-3696-1-git-send-email-amit.shah@redhat.com>
     [not found] ` <20090826112718.GA11117@amit-x200.redhat.com>
2009-08-26 15:45   ` Extending virtio_console to support multiple ports Amit Shah
2009-08-27  4:07     ` Benjamin Herrenschmidt
2009-08-27  6:51       ` [Qemu-devel] " Amit Shah
2009-08-27  9:08       ` Alan Cox
2009-08-27  9:27         ` Benjamin Herrenschmidt
2009-08-27 11:45           ` [PATCH] hvc_console: provide (un)locked version for hvc_resize() Hendrik Brueckner
2009-08-29  1:15         ` [Qemu-devel] Re: Extending virtio_console to support multiple ports Jamie Lokier
2009-08-27  5:04     ` Michael Ellerman [this message]
2009-08-27  6:52       ` Amit Shah
2009-08-27 14:13         ` Ryan Arnold

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=1251349485.6267.6.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=alan@linux.intel.com \
    --cc=amit.shah@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=miltonm@bga.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rsa@us.ibm.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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