Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757256Ab1FUSu5 (ORCPT ); Tue, 21 Jun 2011 14:50:57 -0400 Received: from oproxy7-pub.bluehost.com ([67.222.55.9]:35186 "HELO oproxy7-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752396Ab1FUSuy (ORCPT ); Tue, 21 Jun 2011 14:50:54 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=n0msQ+j+8h5aiKmQUEkSLeBHCHkKB3gA5dZYjHEfuiU31Gos8q9ma+X7zlh0/zzgNv7munr8B9uv+I61FJvlcpiV2nuTS9gSTwJv1mdURZuenmyuUgdq2sJ7jeBRZNMH; Date: Tue, 21 Jun 2011 11:50:43 -0700 From: Jesse Barnes To: Ram Pai Cc: Dominik Brodowski , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, svenkatr@ti.com, yinghai@kernel.org, cjb@laptop.org, linux-pci@vger.kernel.org, linux-net-drivers@solarflare.com, bhutchings@solarflare.com Subject: Re: [PATCH 4/4] PCI: make cardbus-bridge resources nice-to-have Message-ID: <20110621115043.064871db@jbarnes-desktop> In-Reply-To: <20110621162321.GB22917@ram-laptop> References: <1308610037-6261-1-git-send-email-linuxram@us.ibm.com> <1308610037-6261-5-git-send-email-linuxram@us.ibm.com> <20110621075659.GA4620@comet.dominikbrodowski.net> <20110621162321.GB22917@ram-laptop> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2214 Lines: 43 On Tue, 21 Jun 2011 09:23:21 -0700 Ram Pai wrote: > On Tue, Jun 21, 2011 at 09:57:00AM +0200, Dominik Brodowski wrote: > > On Mon, Jun 20, 2011 at 03:47:17PM -0700, Ram Pai wrote: > > > Allocate resources to cardbus bridge only after all other genuine > > > resources requests are satisfied. Dont retry if resource allocation > > > for cardbus-bridge fails. > > > > Well, for those who use cardbus cards, cardbus resources aren't "nice to > > have", they are absolutely required. Of course, not all cardbus cards need > > as many resources as are currently assigned, so I wouldn't oppose a patch > > which marks _some_ of the currently assigned resources as "nice to have". > > But this approach -- 0 required, all "nice to have" -- seems wrong to me. > > Do you know how much minimal resource is good enough? The value, before > this patch, was 256 for IO ports and 64M for memory. > > BTW: If the BIOS has already assigned enough resources for all the devices on > the system, no devices will be starved including the cardbus. The OS intervenes > and is forced to make this hard choice only when it sees unassigned resources to > some devices along with resource contention. I just know this is going to trigger regressions, so I think Dominik's concern is valid. We'll have some existing machine with a device whose resource was never assigned, but we didn't care because it was unused. Now this code will try to give it some address space at the expense of something that *is* being used. But OTOH this will at least try to allocate *some* space to cardbus, we just won't try as hard as with some other resources. I'd mainly like to avoid the situation Dominik pointed out, where we have perfectly good cardbus resources assigned (unlike in Oliver's case) but they're stolen for a bridge that may get a hotplugged device or some other device that didn't have a BIOS assignment. -- Jesse Barnes, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/