Re: [PATCH RFC: linux-next 1/2] irq: Add CPU mask affinity hint callback framework

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter P Waskiewicz Jr
Date: Tuesday, April 27, 2010 - 9:04 am

On Tue, 27 Apr 2010, Thomas Gleixner wrote:


When I register the function callback with the interrupt layer, I need to 
know what device structures to reference back in the driver.  In other 
words, if I call into an underlying driver with just an interrupt number, 
then I have no way at getting at the dev structures (netdevice for me, 
plus my private adapter structures), unless I declare them globally 
(yuck).

I had a different approach before this one where I assumed the device from 
the irq handler callback was safe to use for the device in this new 
callback.  I didn't feel really great about that, since it's an implicit 
assumption that could cause things to go sideways really quickly.

Let me know what you think either way.  I'm certainly willing to make a 
change, I just don't know at this point what's the safest approach from 
what I currently have.


It's leftover paranoia.  I put it in early on, then changed the mode 
later.  I can remove this function.  I'll re-send something once we agree 
on how the code in your first comment should look.

Thanks Thomas!

-PJ
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC: linux-next 1/2] irq: Add CPU mask affinity hin ..., Peter P Waskiewicz Jr, (Sun Apr 18, 9:57 pm)
[PATCH RFC: linux-next 2/2] ixgbe: Example usage of the ne ..., Peter P Waskiewicz Jr, (Sun Apr 18, 9:58 pm)
Re: [PATCH RFC: linux-next 1/2] irq: Add CPU mask affinity ..., Peter P Waskiewicz Jr, (Tue Apr 27, 9:04 am)
Re: [PATCH RFC: linux-next 1/2] irq: Add CPU mask affinity ..., Peter P Waskiewicz Jr, (Thu Apr 29, 10:59 am)
Re: [PATCH RFC: linux-next 1/2] irq: Add CPU mask affinity ..., Peter P Waskiewicz Jr, (Thu Apr 29, 1:28 pm)
Re: [PATCH RFC: linux-next 1/2] irq: Add CPU mask affinity ..., Peter P Waskiewicz Jr, (Thu Apr 29, 2:29 pm)