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

From: Vlastimil Babka
Date: Fri Dec 13 2013 - 03:15:06 EST


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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/