Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263429AbTIBDVp (ORCPT ); Mon, 1 Sep 2003 23:21:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263436AbTIBDVp (ORCPT ); Mon, 1 Sep 2003 23:21:45 -0400 Received: from bay-bridge.veritas.com ([143.127.3.10]:3685 "EHLO mtvmime02.veritas.com") by vger.kernel.org with ESMTP id S263429AbTIBDVo (ORCPT ); Mon, 1 Sep 2003 23:21:44 -0400 Date: Tue, 2 Sep 2003 04:23:24 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@localhost.localdomain To: Rusty Russell cc: Jamie Lokier , Andrew Morton , Ingo Molnar , Subject: Re: [PATCH 2/2] Futex non-page-pinning fix 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: 1398 Lines: 29 On Mon, 1 Sep 2003, Hugh Dickins wrote: > > 5. If you're not doing anything in __remove_from_page_cache (rightly > trying to avoid hotpath), you do need to futex_rehash in mm/swap_state.c > __delete_from_swap_cache (last time I did say without the __s, but that > would miss an instance you need to catch). That will handle the swapoff > case amongst others. Of course, the reason I originally said without the __s, was because move_from_swap_cache uses __delete_from_swap_cache, and we don't want interference there. So best convert that to use __remove_from_page_cache instead, with INC_CACHE_INFO(del_total) outside the locking, after the set_page_dirty: would improve symmetry between move_from_ and move_to_. The instance of __delete_from_swap_cache I say you need to catch, is that in remove_exclusive_swap_page; though I think its count restrictions limit it to cornercases like your test program, rather than real communication between processes. But hold on, in such a cornercase (no other references to the swap), what if the process unmaps the vma containing the futex while it is swapped out and not even in page cache? Unclear. Hugh - 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/