From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: akpm@digeo.com, hch@infradead.org
Subject: [PATCH] vm_operation to avoid pagefault/inval race
Date: Fri, 30 May 2003 16:34:15 -0700 [thread overview]
Message-ID: <20030530163415.A26729@us.ibm.com> (raw)
Rediffed to 2.5.70-mm2.
This patch provides one way for a distributed filesystem to avoid
the pagefault/cross-node-invalidation race described in:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105286345316249&w=2
The advantage of this patch is that it is quite small and quite well
tested. A different approach follows in a separate message.
Thanx, Paul
diff -urN -X dontdiff linux-2.5.70-mm2/include/linux/mm.h linux-2.5.70-mm2.nopagedone/include/linux/mm.h
--- linux-2.5.70-mm2/include/linux/mm.h Fri May 30 14:51:05 2003
+++ linux-2.5.70-mm2.nopagedone/include/linux/mm.h Fri May 30 15:11:24 2003
@@ -143,6 +143,7 @@
void (*open)(struct vm_area_struct * area);
void (*close)(struct vm_area_struct * area);
struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int unused);
+ void (*nopagedone)(struct vm_area_struct * area, unsigned long address, int status);
int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
};
diff -urN -X dontdiff linux-2.5.70-mm2/mm/memory.c linux-2.5.70-mm2.nopagedone/mm/memory.c
--- linux-2.5.70-mm2/mm/memory.c Fri May 30 14:51:06 2003
+++ linux-2.5.70-mm2.nopagedone/mm/memory.c Fri May 30 15:11:24 2003
@@ -1468,6 +1468,9 @@
ret = VM_FAULT_OOM;
out:
pte_chain_free(pte_chain);
+ if (vma->vm_ops && vma->vm_ops->nopagedone) {
+ vma->vm_ops->nopagedone(vma, address & PAGE_MASK, ret);
+ }
return ret;
}
WARNING: multiple messages have this Message-ID (diff)
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: akpm@digeo.com, hch@infradead.org
Subject: [PATCH] vm_operation to avoid pagefault/inval race
Date: Fri, 30 May 2003 16:34:15 -0700 [thread overview]
Message-ID: <20030530163415.A26729@us.ibm.com> (raw)
Rediffed to 2.5.70-mm2.
This patch provides one way for a distributed filesystem to avoid
the pagefault/cross-node-invalidation race described in:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105286345316249&w=2
The advantage of this patch is that it is quite small and quite well
tested. A different approach follows in a separate message.
Thanx, Paul
diff -urN -X dontdiff linux-2.5.70-mm2/include/linux/mm.h linux-2.5.70-mm2.nopagedone/include/linux/mm.h
--- linux-2.5.70-mm2/include/linux/mm.h Fri May 30 14:51:05 2003
+++ linux-2.5.70-mm2.nopagedone/include/linux/mm.h Fri May 30 15:11:24 2003
@@ -143,6 +143,7 @@
void (*open)(struct vm_area_struct * area);
void (*close)(struct vm_area_struct * area);
struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int unused);
+ void (*nopagedone)(struct vm_area_struct * area, unsigned long address, int status);
int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
};
diff -urN -X dontdiff linux-2.5.70-mm2/mm/memory.c linux-2.5.70-mm2.nopagedone/mm/memory.c
--- linux-2.5.70-mm2/mm/memory.c Fri May 30 14:51:06 2003
+++ linux-2.5.70-mm2.nopagedone/mm/memory.c Fri May 30 15:11:24 2003
@@ -1468,6 +1468,9 @@
ret = VM_FAULT_OOM;
out:
pte_chain_free(pte_chain);
+ if (vma->vm_ops && vma->vm_ops->nopagedone) {
+ vma->vm_ops->nopagedone(vma, address & PAGE_MASK, ret);
+ }
return ret;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2003-05-31 0:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-30 23:34 Paul E. McKenney [this message]
2003-05-30 23:34 ` [PATCH] vm_operation to avoid pagefault/inval race Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030530163415.A26729@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=akpm@digeo.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.