lkml.org 
[lkml]   [2000]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bad SMP race in getblk()
On Wed, 2 Aug 2000, Tigran Aivazian wrote:

>But on UP the above alias = __get_hash_table() is not really needed. I
>know that page cache code contains similar "insert unique" tricks which
>hurt UP performance but why not think of a better way to approach it,
>while we are at it?

I agree.

I prefer to do it without lookup too and it's actually trivial to do that
even in SMP. I did a patch against 2.4.0-test5 that should achieve that
purpose (it compiles but I've not booted it).

ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.0-test5/getblk-smp-race-1

And this is a fix for a deadlock during OOM (spotted by Ingo Molnar) a
while ago. If you think it's better to break schedule in two instead of
the below hack that's ok for me (OTOH the performance difference should be
irrelevant at least for the below case, the conditional_schedule() would
get sure more benefit but still the schedule case is a slow path there
too).

ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.4/2.4.0-test5/refill_freelist-oom-deadlock-1

Andrea


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