public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: KY Srinivasan <kys@microsoft.com>
Cc: Olaf Hering <olaf@aepfle.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"apw@canonical.com" <apw@canonical.com>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: Re: [PATCH 2/5] hv: add helpers to handle hv_util device state
Date: Mon, 21 Sep 2015 09:43:30 -0700	[thread overview]
Message-ID: <20150921164330.GD26912@kroah.com> (raw)
In-Reply-To: <BY2PR0301MB1654B6FF1FB43DA79CC849E3A0460@BY2PR0301MB1654.namprd03.prod.outlook.com>

On Mon, Sep 21, 2015 at 04:34:56PM +0000, KY Srinivasan wrote:
> 
> 
> > -----Original Message-----
> > From: Olaf Hering [mailto:olaf@aepfle.de]
> > Sent: Monday, September 21, 2015 3:26 AM
> > To: KY Srinivasan <kys@microsoft.com>; Greg KH
> > <gregkh@linuxfoundation.org>
> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org;
> > apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com
> > Subject: Re: [PATCH 2/5] hv: add helpers to handle hv_util device state
> > 
> > On Sun, Sep 20, Greg KH wrote:
> > 
> > > Just use a lock, that's what it is there for.
> > 
> > How would that help? It might help because it enforces ordering. But
> > that requires that all three utils get refactored to deal with the
> > introduced locking. I will let KY comment on this.
> > 
> > The issue I see with fcopy is that after or while fcopy_respond_to_host
> > runs an interrupt triggers which also calls into
> > hv_fcopy_onchannelcallback.  It was most likely caused by a logic change
> > in "recent" vmbus updates because this did not happen before. At least,
> > the fcopy hang was not seen earler. Maybe the bug did just not trigger
> > up to now for other reasons...
> 
> All util channels are bound to CPU 0. Just forcing all activity on CPU 0 may be the 
> simplest solution here. Besides, these are not performance critical services anyway.
> 
> The problem you may have run into could be related to the fact that we could potentially
> run the polling function on a CPU other than CPU 0.

Again, this sounds like a locking issue, you have multiple
threads/processes accessing the same data.  Even if you bind it all to
one cpu, this shows a real design problem.

Use a lock to fix this properly.  That way, when you stop using only one
CPU, the code will "just work", and if you are really only on one CPU
today, there will not be any lock contention.

thanks,

greg k-h

  reply	other threads:[~2015-09-21 16:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16  0:37 [PATCH 0/5] Drivers: hv: Miscellaneous fixes K. Y. Srinivasan
2015-09-16  0:37 ` [PATCH 1/5] Drivers: hv: vmbus: fix init_vp_index() for reloading hv_netvsc K. Y. Srinivasan
2015-09-16  0:37   ` [PATCH 2/5] hv: add helpers to handle hv_util device state K. Y. Srinivasan
2015-09-21  5:25     ` Greg KH
2015-09-21 10:26       ` Olaf Hering
2015-09-21 11:25         ` Vitaly Kuznetsov
2015-09-21 12:17           ` Olaf Hering
2015-09-21 13:37             ` Vitaly Kuznetsov
2015-09-21 16:45             ` KY Srinivasan
2015-09-21 16:34         ` KY Srinivasan
2015-09-21 16:43           ` Greg KH [this message]
2015-09-21 17:00             ` KY Srinivasan
2015-09-16  0:37   ` [PATCH 3/5] hv: fcopy: use wrappers to propagate state K. Y. Srinivasan
2015-09-16  0:37   ` [PATCH 4/5] hv: kvp: use wrappers to propaigate state K. Y. Srinivasan
2015-09-21  5:26     ` Greg KH
2015-09-21 10:18       ` Olaf Hering
2015-09-21 16:31         ` KY Srinivasan
2015-09-21 16:16       ` KY Srinivasan
2015-09-16  0:37   ` [PATCH 5/5] hv: vss: use wrappers to propagate state K. Y. Srinivasan

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=20150921164330.GD26912@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=vkuznets@redhat.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