All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Mike Travis <travis@sgi.com>, Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, Jesse Barnes <jbarnes@virtuousgeek.org>,
	Jacob Pan <jacob.jun.pan@intel.com>, Tejun Heo <tj@kernel.org>,
	Mike Habeck <habeck@sgi.com>, LKML <linux-kernel@vger.kernel.org>,
	Yinghai <yinghai.lu@oracle.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [Patch 1/1] x86 pci: Add option to not assign BAR's if not already assigned
Date: Thu, 13 May 2010 12:08:07 -0700	[thread overview]
Message-ID: <4BEC4E17.3090206@zytor.com> (raw)
In-Reply-To: <201005131256.17997.bjorn.helgaas@hp.com>

On 05/13/2010 11:56 AM, Bjorn Helgaas wrote:
> 
> I'm a little bit nervous about Linux's current strategy of assigning
> resources to things before we even know whether we're going to use
> them.  We don't support dynamic PCI resource reassignment, so maybe
> we don't have any choice in this case, but generally I prefer the
> lazy approach.
> 

Lazy has its own pitfalls.  In particular, the issue here is about
allocation of bridge devices, which may cause all kinds of issues with
bridges further up.  Consider:


	       A
	      / \
             B   C
             |   |
             D   E

... where A, B, and C are bridges, and D and E are devices.  Now the
driver initializes D, and requests address space.  As a result, the OS
configures bridge B to have a 4K window, and accordingly the same for
bridge A.

Now you want to initialize device E.  This means the window for bridge A
has to be widened, because bridge C is going to need its own 4K window.
 If the linearly consecutive address space is not available, it now
means reconfiguring bridge B and device D.

4K granularity really hurts.  It made sense when bridges were relatively
rare, but in PCI-express world that is no longer the case...

	-hpa

  reply	other threads:[~2010-05-13 19:08 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 18:14 [Patch 1/1] x86 pci: Add option to not assign BAR's if not already assigned Mike Travis
2010-05-13 18:56 ` Bjorn Helgaas
2010-05-13 19:08   ` H. Peter Anvin [this message]
2010-05-13 19:12   ` Mike Travis
2010-05-13 19:13     ` Mike Travis
2010-05-13 19:54     ` Bjorn Helgaas
2010-05-13 20:27       ` Mike Habeck
2010-05-13 19:38   ` Mike Habeck
2010-05-13 20:02     ` Bjorn Helgaas
2010-05-13 20:09       ` H. Peter Anvin
2010-05-14 22:25       ` Jesse Barnes
2010-05-14 22:34         ` Mike Travis
2010-05-14 22:35           ` H. Peter Anvin
2010-05-14 22:40             ` Mike Travis
2010-05-15  2:25               ` Mike Travis
2010-05-14 22:47           ` Jesse Barnes
2010-05-14 22:59             ` Mike Travis
2010-05-14 23:06               ` Jesse Barnes
2010-05-14 23:23                 ` Mike Travis
2010-05-14 23:33                   ` Jesse Barnes
2010-05-14 23:40                     ` H. Peter Anvin
2010-05-15  0:02                       ` Jesse Barnes
2010-05-14 23:20             ` H. Peter Anvin
2010-05-14 23:28               ` Jesse Barnes
2010-05-14 23:32                 ` H. Peter Anvin
2010-05-14 23:34                   ` Jesse Barnes
2010-05-14 23:39                     ` H. Peter Anvin
2010-05-15  0:00                       ` Jesse Barnes
2010-05-15  0:14                         ` H. Peter Anvin
2010-05-13 20:36     ` Yinghai Lu
2010-05-13 20:34       ` H. Peter Anvin
2010-05-13 18:58 ` Bjorn Helgaas
2010-05-28 16:53 ` Mike Travis
2010-05-28 17:00   ` H. Peter Anvin
2010-05-28 17:10     ` Mike Travis
2010-05-28 19:28       ` Jesse Barnes
2010-05-28 20:04       ` H. Peter Anvin
2010-05-31 11:12         ` Mike Travis
2010-05-31 16:36           ` H. Peter Anvin
2010-06-01 22:49           ` Bjorn Helgaas
2010-06-02  7:31             ` H. Peter Anvin
2010-06-02 15:45               ` Bjorn Helgaas
2010-06-02 15:47                 ` H. Peter Anvin
2010-06-02 15:53                   ` Jesse Barnes
2010-06-09  0:53                     ` H. Peter Anvin
2010-06-09  1:26                       ` Jesse Barnes
2010-06-09 14:23                         ` Mike Habeck
2010-06-02 15:53             ` Mike Habeck
2010-06-02 16:40               ` Bjorn Helgaas

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=4BEC4E17.3090206@zytor.com \
    --to=hpa@zytor.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=habeck@sgi.com \
    --cc=jacob.jun.pan@intel.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=travis@sgi.com \
    --cc=x86@kernel.org \
    --cc=yinghai.lu@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.