On Thu, Apr 21, 2011 at 04:00:39PM -0400, Neil Horman wrote: > On Thu, Apr 21, 2011 at 01:10:41PM -0600, Matthew Wilcox wrote: > > On Thu, Apr 21, 2011 at 02:57:47PM -0400, Neil Horman wrote: > > > b) msi_table - populated only if msi(x) is enabled, it lists the irqs allocated > > > to the pci device > > > > You're not the first one to try this ... the problem is, you can easily > > overflow a single 4k page. A device can have up to 2k MSI-X entries, > > and we might take up to 5 bytes for each one, so we'd need a 10k buffer. > > > Yeah, I was a bit worried about that - but I didn't think any sane device would > allocate en entire 2048 irqs (not that thats an excuse). I had considered doing > an export format like local_cpulist where consecutive irq allocations are listed > as first-last, which would save space and keep us inside a page. Thoughts? Nope, again, sysfs is "one value per file" please. So don't do it this way. If you look in the archives, I've posted how this could be done, but it gets really messy quickly, as people have found out. You should look there first at those attempts before you reinvent them here (as you are doing...) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html