lkml.org 
[lkml]   [2005]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc] [patch] consolidate/clean up spinlock.h files
Hello Ingo,

On Thu, 2 Jun 2005, Ingo Molnar wrote:

> the attached patch (written by me and also containing many suggestions
> of Arjan van de Ven) does a major cleanup of the spinlock code. It does
> the following things:
>
> - consolidates and enhances the spinlock/rwlock debugging code
>
> - simplifies the asm/spinlock.h files
>
> - encapsulates the raw spinlock types and moves generic spinlock
> features (such as ->break_lock) into the generic code.
>
> - cleans up the spinlock code hierarchy to get rid of spaghetti.
>
> most notably there's now only a single variant of the debugging code,
> located in lib/spinlock_debug.c. (previously we had one SMP debugging
> variant per architecture, plus a separate generic one for UP builds)
>
> also, i've enhanced the rwlock debugging facility, it will now track
> write-owners. There is new spinlock-owner/CPU-tracking on SMP builds
> too.
>
> the arch-level include files now only contain the minimally necessary
> subset of the spinlock code - all the rest that can be generalized now
> lives in the generic headers:
>
> include/asm-i386/spinlock.h | 116 +----
> include/asm-i386/spinlock_types.h | 16
> include/asm-x86_64/spinlock.h | 146 +------
> include/asm-x86_64/spinlock_types.h | 16
>
> i've also split up the various spinlock variants into separate files,
> making it easier to see which does what. The new layout is:

I like the cleanup/consolidation of the debug variants,
that was pretty much overdue. My only qualm is in the increase of header
files (some of them could have remained 1 file), unless of course this new
structure makes work on a followup/dependent patch (is there one?) easier.

Thanks,
Zwane

-
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-06-02 23:28    [W:0.080 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site