mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Sell, Timothy C" <Timothy.Sell@unisys.com>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"timur@freescale.com" <timur@freescale.com>,
	"galak@kernel.crashing.org" <galak@kernel.crashing.org>,
	"Kershner, David A" <David.Kershner@unisys.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"Arfvidson, Erik" <Erik.Arfvidson@unisys.com>,
	"hofrat@osadl.org" <hofrat@osadl.org>,
	"dzickus@redhat.com" <dzickus@redhat.com>,
	"Curtin, Alexander Paul" <Alexander.Curtin@unisys.com>,
	"janani.rvchndrn@gmail.com" <janani.rvchndrn@gmail.com>,
	"sudipm.mukherjee@gmail.com" <sudipm.mukherjee@gmail.com>,
	"prarit@redhat.com" <prarit@redhat.com>,
	"Binder, David Anthony" <David.Binder@unisys.com>,
	"nhorman@redhat.com" <nhorman@redhat.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"driverdev-devel@linuxdriverproject.org" 
	<driverdev-devel@linuxdriverproject.org>,
	*S-Par-Maintainer <SParMaintainer@unisys.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Jes Sorensen <Jes.Sorensen@redhat.com>
Subject: Re: new driver for drivers/virt/?
Date: Thu, 19 May 2016 00:11:46 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1605182347080.3851@nanos> (raw)
In-Reply-To: <a844c1c330ea4908a483f2fdb4255876@US-EXCH13-2.na.uis.unisys.com>

On Wed, 18 May 2016, Sell, Timothy C wrote:
> We have a bus driver currently in drivers/staging/unisys/visorbus/ that
> we are trying to get out of staging and into the kernel proper.  Since
> "visorbus" is a driver to host a virtual bus presented to a Linux guest
> in a hypervisor environment (refer to 
> drivers/staging/unisys/Documentation/overview.txt for more details),
> Greg KH and Jes Sorensen have suggested the possibility that drivers/virt/
> might be a good place for visorbus.  But right now, we see that the only
> driver under drivers/virt/ is the Freescale hypervisor environment, which
> made us wonder whether this was really the correct place.
> 
> Would you have any guidance for us?
> Our intent is to push our visorbus out of staging immediately following
> the current merge window.

What's the problem with Gregs and Jes suggestion? I don't see any.

There is bigger fish to fry than the final place of this driver. I had just a
peek at the staging code and there is enough stuff which wants to be cleaned
up before moving anywhere. I don't have time to do a proper review now, but
here are a few hints upfront:

1) Locking:

   visordriver_callback_lock: 

      That should be a mutex, not a semaphore

   periodic_work->lock: 

      Why is this a rw_lock if it's only locked with write_lock? And what's
      the purpose of this lock at all?

2) Memory barriers:

   Completely undocumented wmb()s without corresponding rmb()s to do obscure
   protection of that periodic work stuff.

3) periodic_work:

   That set of functions is obscure. Especially visor_periodic_work_stop()
   makes me shudder. See also #2. 

   That work->lock does not inspire my confidence further.

4) Exports:

   A gazillion of exports which are just wrappers around another set of
   exports

5) Function comments:

   Try to mimic kerneldoc comments, i.e. start with: /**
   but do not implement any of the kerneldoc requirements.

I'll try do find a time slot for a proper review of that thing, but don't
expect that to happen in the next days.

Thanks,

	tglx

   

  reply	other threads:[~2016-05-18 22:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 20:11 Sell, Timothy C
2016-05-18 22:11 ` Thomas Gleixner [this message]
2016-05-18 22:24   ` Greg KH
2016-05-19  6:22     ` Sell, Timothy C
2016-05-18 22:24   ` Sell, Timothy C
2016-05-19 14:44   ` Sell, Timothy C

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=alpine.DEB.2.11.1605182347080.3851@nanos \
    --to=tglx@linutronix.de \
    --cc=Alexander.Curtin@unisys.com \
    --cc=David.Binder@unisys.com \
    --cc=David.Kershner@unisys.com \
    --cc=Erik.Arfvidson@unisys.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=SParMaintainer@unisys.com \
    --cc=Timothy.Sell@unisys.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=dzickus@redhat.com \
    --cc=galak@kernel.crashing.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hofrat@osadl.org \
    --cc=hpa@zytor.com \
    --cc=janani.rvchndrn@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nhorman@redhat.com \
    --cc=prarit@redhat.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=timur@freescale.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

all inboxes | Powered by JetHome®