Re: [RFC][PATCH] Add sysfs entry that displays MSI-X IRQs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 14, 2008 at 02:53:10PM +1100, Vincent Rizza wrote:
> The goal was to expose the IRQs to userspace. The indexes don't matter, 
> just the IRQs. Is there a reason why we would need the indexes? One 

Yes.  Some cards (the s2io comes to mind) has meaning attached to which
vector is in use, and doesn't just use them linearly.

> thing about using indexes though, how would the show function work? I 
> assume the filename would be the index into msi_list. Then each time the 
> show function is executed you walk the list until you hit that index. 

You'd look for entry_nr in the msi_desc.msi_attrib.

> That would be my way of doing it but it means a spinlock needs to be put 
> in that show function and in msi_free_irqs when walking msi_list. With a 
> binary attribute and it's private pointer or an irq-filename we could 
> avoid that.

The problem with all this (as there is with any sysfs entry) is that
anything you keep a pointer to on open has to be refcounted.  We don't
want to add a refcount entry to every msi_desc.  Walking the list,
while ugly and potentially slow, does avoid having to keep a refcount
on anything but the pci_dev.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux