lkml.org 
[lkml]   [2003]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.052 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site