From: Greg KH <greg@kroah.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
linux-kernel@vger.kernel.org,
Jesse Barnes <jbarnes@virtuousgeek.org>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci: Export pci device msi table via sysfs
Date: Thu, 21 Apr 2011 13:34:37 -0700 [thread overview]
Message-ID: <20110421203437.GB15929@kroah.com> (raw)
In-Reply-To: <20110421200039.GC18449@hmsreliant.think-freely.org>
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
next prev parent reply other threads:[~2011-04-21 20:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 18:57 [PATCH] pci: Export pci device msi table via sysfs Neil Horman
2011-04-21 19:10 ` Matthew Wilcox
2011-04-21 20:00 ` Neil Horman
2011-04-21 20:34 ` Greg KH [this message]
2011-04-21 20:26 ` Greg KH
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=20110421203437.GB15929@kroah.com \
--to=greg@kroah.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=nhorman@tuxdriver.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.