lkml.org 
[lkml]   [1998]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: AMI MegaRAID beta release
Date

Thanks, I'm in the process of fixing the mistakes you pointed out...

> > +#define ENQUEUE(obj,type,list,next) \
> > +{ type **node; long cpuflag; \
> > + save_flags(cpuflag); cli(); \
> > + for(node=&(list); *node; node=(type **)&(*node)->##next); \
> > + (*node) = obj; \
> > + (*node)->##next = NULL; \
> > + restore_flags(cpuflag); \
> > +};
> > +
> > +#define DEQUEUE(obj,type,list,next) \
> > +{ long cpuflag; \
> > + save_flags(cpuflag); cli(); \
> > + if ((obj=list) != NULL) {\
> > + list = (type *)(list)->##next; \
> > + } \
> > + restore_flags(cpuflag); \
> > +};
>
> Do you really need a global cli() here? IMHO a IRQ-safe spinlock would
> be
> sufficient and it would give better performance on SMP systems.
>
I will look into using spinlocks, but I notice they are only defined in the
2.1
kernels. My primary concern so far was to get a working driver out that
our customers could use with an out-of-the-box Linux distribution,
without having to otherwise upgrade their kernel. I should have mentioned
in
my first post that SMP wasn't supported yet. That's the next thing on my
list to add though. Can you point me toward a reference that explains when
which locks can and should be used?

-
Jeff L Jones (jeffreyj@ami.com)
RAID SW Dev, American Megatrends Inc.





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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