lkml.org 
[lkml]   [2000]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] adaptive semaphores: better performance for "short semaphores" or "long spinlocks"
Martin Schenk wrote:
> This patch adds two functions (down_spin and down_adapt) that try
> to address the problems of
>
> - semaphores that are generally held for a very short time, so
> scheduling on contention is very inefficient in most cases,
> but still necessary in some others (to avoid deadlocks)
>
> - spinlocks that are occasionally held for a long time, so scheduling
> would be efficient in some cases - but that have sometimes to be
> taken where scheduling simply is not allowed.

Perhaps it would be better for a "short spin" to actually perform all
the calculations of a schedule (goodness loop etc.), while checking to
see if it should abort.

That way the overhead of a real schedule() would be avoided when the
contention isn't that long, and when there is a schedule, most of the
hard work has been done already.

enjoy,
-- Jamie

-
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.tux.org/lkml/

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