Re: [PATCH] mm: documentation: remove hopelessly out-of-date locking doc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/10/2013 08:18 PM, Dave Hansen wrote:
From: Dave Hansen <dave.hansen@xxxxxxxxx>

Documentation/vm/locking is a blast from the past.  In the entire
git history, it has had precisely Three modifications.  Two of
those look to be pure renames, and the third was from 2005.

The doc contains such gems as:

The page_table_lock is grabbed while holding the
kernel_lock spinning monitor.

Page stealers hold kernel_lock to protect against a bunch of
races.

Or this which talks about mmap_sem:

4. The exception to this rule is expand_stack, which just
    takes the read lock and the page_table_lock, this is ok
    because it doesn't really modify fields anybody relies on.

expand_stack() doesn't take any locks any more directly, and the
mmap_sem acquisition was long ago moved up in to the page fault
code itself.

It could be argued that we need to rewrite this, but it is
dangerous to leave it as-is.  It will confuse more people than it
helps.

Heh yeah, when I started few months ago and stumbled upon this doc, people in the office suggested that I could send a patch that just deletes it. I wasn't that brave, but I agree nevertheless.

Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]