The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <muli@il.ibm.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andi Kleen <ak@suse.de>, Jeff Garzik <jeff@garzik.org>,
	Yinghai Lu <Yinghai.Lu@Sun.COM>, Andrew Morton <akpm@osdl.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Jon Mason <jdmason@gmail.com>
Subject: Re: [PATCH 1/1] x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata
Date: Thu, 12 Jul 2007 12:17:00 +0300	[thread overview]
Message-ID: <20070712091700.GL4189@rhun.haifa.ibm.com> (raw)
In-Reply-To: <1184231585.2720.8.camel@laptopd505.fenrus.org>

On Thu, Jul 12, 2007 at 05:13:05PM +0800, Arjan van de Ven wrote:

> > > I very much start to dislike the untyped "sysdata"... I much
> > > rather have separate fields for the different uses (like a IOMMU
> > > field) that aren't going to share ever. Possibly even typed, but
> > > for IOMMU that may be tricky....
> > 
> > Could you elaborate on what you mean here?
> > 
> > If you mean instead of hanging a pci_sysdata off of struct
> > pci_bus, hang a 'void *iommu' and an 'int node' directly off of
> > the pci_bus,
> 
> yes that is what I mean.
> 
> > that looks like a lot of churn (most architecture use sysdata as
> > an opaque pointer to an arch specific structure) and bloat (you
> > would
> 
> it's only a few bytes per pci device/bus. not all that bad for
> having something which involves splitting a shared pointer into
> logical users.
> 
> (and heck, if you really really are worried we could make it a union
> for some of them, although that defeats the "split is safer"
> benefit)

It's not just bloat and code churn, I also don't like teaching every
architecture about every other architecture's use of sysdata, which is
inherently architecture specific. I think the benefits of modularity
here outweigh the benefits of a little type safety.

Cheers,
Muli

      reply	other threads:[~2007-07-12  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-11 13:45 [PATCH 1/1] x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata Muli Ben-Yehuda
2007-07-11 16:41 ` Yinghai Lu
2007-07-11 17:50   ` Muli Ben-Yehuda
2007-07-12  1:17 ` Arjan van de Ven
2007-07-12  9:10   ` Muli Ben-Yehuda
2007-07-12  9:13     ` Arjan van de Ven
2007-07-12  9:17       ` Muli Ben-Yehuda [this message]

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=20070712091700.GL4189@rhun.haifa.ibm.com \
    --to=muli@il.ibm.com \
    --cc=Yinghai.Lu@Sun.COM \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=jdmason@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.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