Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 27 Sep 2002 13:25:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 27 Sep 2002 13:25:59 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:15375 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Fri, 27 Sep 2002 13:25:33 -0400 Date: Fri, 27 Sep 2002 10:32:04 -0700 (PDT) From: Linus Torvalds To: Ingo Molnar cc: Andrew Morton , Rusty Russell , Subject: Re: [patch] 'virtual => physical page mapping cache', vcache-2.5.38-B8 In-Reply-To: Message-ID: 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: 1009 Lines: 34 On Fri, 27 Sep 2002, Ingo Molnar wrote: > > the problem is that we want to catch all COW events of the virtual > address, *and* we want to have a correct (physpage,offset) futex hash. So? spin_lock(&futex_lock); > q.page = NULL; > attach_vcache(&q.vcache, uaddr, current->mm, futex_vcache_callback); > > page = pin_page(uaddr - offset); > ret = IS_ERR(page); > if (ret) > goto out; > head = hash_futex(page, offset); > set_current_state(TASK_INTERRUPTIBLE); > init_waitqueue_head(&q.waiters); > add_wait_queue(&q.waiters, &wait); > queue_me(head, &q, page, offset, -1, NULL, uaddr); spin_unlock(&futex_lock); And get the futex_lock in the callback. Linus - 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/