Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261989AbVADUPW (ORCPT ); Tue, 4 Jan 2005 15:15:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261832AbVADUHa (ORCPT ); Tue, 4 Jan 2005 15:07:30 -0500 Received: from omx1-ext.sgi.com ([192.48.179.11]:23961 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S262132AbVADT6V (ORCPT ); Tue, 4 Jan 2005 14:58:21 -0500 Date: Tue, 4 Jan 2005 11:58:13 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andi Kleen cc: Hugh Dickins , akpm@osdl.org, Nick Piggin , linux-mm@kvack.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: page fault scalability patch V14 [5/7]: x86_64 atomic pte operations In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1217 Lines: 29 On Tue, 4 Jan 2005, Andi Kleen wrote: > Christoph Lameter writes: > > I bet this has been never tested. I tested this back in October and it worked fine. Would you be able to test your proposed modifications and send me a patch? > > +#define pmd_test_and_populate(mm, pmd, pte) \ > > + (cmpxchg((int *)pmd, PMD_NONE, _PAGE_TABLE | __pa(pte)) == PMD_NONE) > > +#define pud_test_and_populate(mm, pud, pmd) \ > > + (cmpxchg((int *)pgd, PUD_NONE, _PAGE_TABLE | __pa(pmd)) == PUD_NONE) > > +#define pgd_test_and_populate(mm, pgd, pud) \ > > + (cmpxchg((int *)pgd, PGD_NONE, _PAGE_TABLE | __pa(pud)) == PGD_NONE) > > + > > Shouldn't this all be (long *)pmd ? page table entries on x86-64 are 64bit. > Also why do you cast at all? i think the macro should handle an arbitary > pointer. The macro checks for the size of the pointer and then generates the appropriate cmpxchg instruction. pgd_t is a struct which may be problematic for the cmpxchg macros. - 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/