lkml.org 
[lkml]   [2008]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: EMM: Fixup return value handling of emm_notify()
From
Date
On Wed, 2008-04-02 at 14:33 -0700, Christoph Lameter wrote:
> On Wed, 2 Apr 2008, Andrea Arcangeli wrote:
>
> > but anyway it's silly to be hardwired to such an interface that worst
> > of all requires switch statements instead of proper pointer to
> > functions and a fixed set of parameters and retval semantics for all
> > methods.
>
> The EMM API with a single callback is the simplest approach at this point.
> A common callback for all operations allows the driver to implement common
> entry and exit code as seen in XPMem.

It seems to me that common code can be shared using functions? No need
to stuff everything into a single function. We have method vectors all
over the kernel, we could do a_ops as a single callback too, but we
dont.

FWIW I prefer separate methods.

> I guess we can complicate this more by switching to a different API or
> adding additional emm_xxx() callback if need be but I really want to have
> a strong case for why this would be needed. There is the danger of
> adding frills with special callbacks in this and that situation that could
> make the notifier complicated and specific to a certain usage scenario.
>
> Having this generic simple interface will hopefully avoid such things.
>
>



\
 
 \ /
  Last update: 2008-04-03 12:43    [W:0.666 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site