lkml.org 
[lkml]   [2003]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [CFT][RFC] HT scheduler


William Lee Irwin III wrote:

>William Lee Irwin III wrote:
>
>>>There is a spinloop in __up_read(), which is probably it.
>>>
>
>On Fri, Dec 12, 2003 at 02:51:32AM +1100, Nick Piggin wrote:
>
>>Oh I see - in rwsem_wake?
>>
>
>Even before that:
>
>static inline void __up_read(struct rw_semaphore *sem)
>{
> __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
> __asm__ __volatile__(
> "# beginning __up_read\n\t"
>LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
> " js 2f\n\t" /* jump if the lock is being waited upon */
> "1:\n\t"
> LOCK_SECTION_START("")
> "2:\n\t"
> " decw %%dx\n\t" /* do nothing if still outstanding active readers
> */
> " jnz 1b\n\t"
> " pushl %%ecx\n\t"
> " call rwsem_wake\n\t"
> " popl %%ecx\n\t"
> " jmp 1b\n"
> LOCK_SECTION_END
>

I think there shouldn't be a loop - remember the lock section.


-
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:59    [from the cache]
©2003-2011 Jasper Spaans