Re: [PATCH] lighten mmlist_lock

From: William Lee Irwin III
Date: Sun Sep 05 2004 - 18:42:08 EST


On Sun, Sep 05, 2004 at 11:47:11PM +0100, Hugh Dickins wrote:
> --- 2.6.9-rc1-bk12/arch/i386/mm/pgtable.c 2004-08-14 06:39:29.000000000 +0100
> +++ linux/arch/i386/mm/pgtable.c 2004-09-05 17:07:03.438766776 +0100
> @@ -165,10 +165,8 @@ void pmd_ctor(void *pmd, kmem_cache_t *c
> * against pageattr.c; it is the unique case in which a valid change
> * of kernel pagetables can't be lazily synchronized by vmalloc faults.
> * vmalloc faults work because attached pagetables are never freed.
> - * If the locking proves to be non-performant, a ticketing scheme with
> - * checks at dup_mmap(), exec(), and other mmlist addition points
> - * could be used. The locking scheme was chosen on the basis of
> - * manfred's recommendations and having no core impact whatsoever.
> + * The locking scheme was chosen on the basis of manfred's
> + * recommendations and having no core impact whatsoever.
> * -- wli
> */
> spinlock_t pgd_lock = SPIN_LOCK_UNLOCKED;

The ticketing scheme -based alternative only really has to involve a
pgd coming into active use, so s/mmlist addition points/pgd reuse points/
would be better here to retain instructions for anyone suffering from
contention on pgd_lock how to address the issue with the new mmlist
scheme. pgd_alloc() and pgd_free() actually appear to suffice, and it's
also worth mentioning the ticketing scheme's MMU context switch and
smp_call_function() requirements as well.

So I'll send an update to that comment a bit later on.


-- wli
-
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/