Messages in this thread | | | Date | Fri, 24 Jan 2003 13:21:36 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH] to support hookable flush_tlb* functions |
| |
Thomas Schlichter <schlicht@rumms.uni-mannheim.de> wrote: > > Hello, > > with this mail I send a patch that allows kernel modules to hook into the > different flush_tlb* functions defined in <asm/tlbflush.h> or <asm/pgtable.h> in > order to synchronize devices TLBs.
Looks sensible enough.
A few coding-style nits:
+typedef struct tlb_hook_struct { +... +} tlb_hook_t;
typedefs are unpopular. Please just use
struct tlb_hook { ... };
+static inline void flush_tlb_hook( void )
extraneous whitespace - Linus style is flush_tlb_hook(void)
+ while( hook )
while (hook)
+ { + if( hook->flush_tlb )
if (hook->flush_tlb)
+ hook->flush_tlb( );
hook->flush_tlb();
etc...
The unregister_hook implementation is racy - the hook could be in use on another CPU. That's OK - we have the RCU infrastructure which will allow hooks to be torn down safely. And nice people who can help others who are using that code.
> The i386 patch also includes some cleanups by renaming __flush_tlb_* to > local_flush_tlb_*.
That makes plenty of sense.
> I hope some time this patches will make it into the kernel sources. (perhaps > even into 2.6.x ?)
Well the big questions are: where are the drivers for these devices? When can we expect to see significant demand for these devices? Will there be significant demand across the lifetime of the 2.6 kernel?
BTW, when you say "low latency NICs that will implement direct user space DMA transfers to not pinned user pages", what do you mean by "not pinned"?
- 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/
| |