aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/vm_machdep.c4
-rw-r--r--sys/amd64/amd64/vm_machdep.c4
-rw-r--r--sys/dev/md/md.c2
-rw-r--r--sys/i386/i386/uio_machdep.c2
-rw-r--r--sys/i386/i386/vm_machdep.c4
-rw-r--r--sys/ia64/ia64/vm_machdep.c4
-rw-r--r--sys/kern/uipc_cow.c2
-rw-r--r--sys/kern/uipc_syscalls.c2
-rw-r--r--sys/powerpc/aim/vm_machdep.c4
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c4
-rw-r--r--sys/sparc64/sparc64/uio_machdep.c2
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c4
-rw-r--r--sys/sys/sf_buf.h2
13 files changed, 20 insertions, 20 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index 696dbb52a82c..25cf80ee52ee 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -405,7 +405,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -414,7 +414,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 89a26095b979..b784368f09e4 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -460,7 +460,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -469,7 +469,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 985de26205bf..d00e103e5f2f 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -546,7 +546,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
m = vm_page_grab(sc->object, i,
VM_ALLOC_NORMAL|VM_ALLOC_RETRY);
VM_OBJECT_UNLOCK(sc->object);
- sf = sf_buf_alloc(m);
+ sf = sf_buf_alloc(m, 0);
VM_OBJECT_LOCK(sc->object);
if (bp->bio_cmd == BIO_READ) {
if (m->valid != VM_PAGE_BITS_ALL)
diff --git a/sys/i386/i386/uio_machdep.c b/sys/i386/i386/uio_machdep.c
index 6d6eefdb160f..2551faee04ba 100644
--- a/sys/i386/i386/uio_machdep.c
+++ b/sys/i386/i386/uio_machdep.c
@@ -92,7 +92,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
cnt = n;
page_offset = offset & PAGE_MASK;
cnt = min(cnt, PAGE_SIZE - page_offset);
- sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT]);
+ sf = sf_buf_alloc(ma[offset >> PAGE_SHIFT], 0);
cp = (char *)sf_buf_kva(sf) + page_offset;
switch (uio->uio_segflg) {
case UIO_USERSPACE:
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index feccc01febae..06e4ed41d56f 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -606,7 +606,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_head *hash_list;
struct sf_buf *sf;
@@ -628,7 +628,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_buf_freelist, &sf_buf_lock, PVM|PCATCH,
+ error = msleep(&sf_buf_freelist, &sf_buf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index 59725b6bed30..ccf71315d023 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -344,7 +344,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -353,7 +353,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c
index 4a5ccd005a8b..6805804adeda 100644
--- a/sys/kern/uipc_cow.c
+++ b/sys/kern/uipc_cow.c
@@ -138,7 +138,7 @@ socow_setup(struct mbuf *m0, struct uio *uio)
/*
* Allocate an sf buf
*/
- sf = sf_buf_alloc(pp);
+ sf = sf_buf_alloc(pp, PCATCH);
if (!sf) {
vm_page_lock_queues();
vm_page_cowclear(pp);
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 8884a905427f..295124da4346 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1919,7 +1919,7 @@ retry_lookup:
* Get a sendfile buf. We usually wait as long as necessary,
* but this wait can be interrupted.
*/
- if ((sf = sf_buf_alloc(pg)) == NULL) {
+ if ((sf = sf_buf_alloc(pg, PCATCH)) == NULL) {
mbstat.sf_allocfail++;
vm_page_lock_queues();
vm_page_unwire(pg, 0);
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 44f2f6c8921d..796ae66f62a2 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -259,7 +259,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -268,7 +268,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index 44f2f6c8921d..796ae66f62a2 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -259,7 +259,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -268,7 +268,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/sparc64/sparc64/uio_machdep.c b/sys/sparc64/sparc64/uio_machdep.c
index ea6671731ce5..e44028ba12dd 100644
--- a/sys/sparc64/sparc64/uio_machdep.c
+++ b/sys/sparc64/sparc64/uio_machdep.c
@@ -101,7 +101,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
m = ma[offset >> PAGE_SHIFT];
pa = VM_PAGE_TO_PHYS(m);
if (m->md.color != DCACHE_COLOR(pa)) {
- sf = sf_buf_alloc(m);
+ sf = sf_buf_alloc(m, 0);
cp = (char *)sf_buf_kva(sf) + page_offset;
} else {
sf = NULL;
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index 459aaf65b11a..e2b785a7b3bb 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -389,7 +389,7 @@ sf_buf_init(void *arg)
* Get an sf_buf from the freelist. Will block if none are available.
*/
struct sf_buf *
-sf_buf_alloc(struct vm_page *m)
+sf_buf_alloc(struct vm_page *m, int pri)
{
struct sf_buf *sf;
int error;
@@ -398,7 +398,7 @@ sf_buf_alloc(struct vm_page *m)
while ((sf = SLIST_FIRST(&sf_freelist.sf_head)) == NULL) {
sf_buf_alloc_want++;
mbstat.sf_allocwait++;
- error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM|PCATCH,
+ error = msleep(&sf_freelist, &sf_freelist.sf_lock, PVM | pri,
"sfbufa", 0);
sf_buf_alloc_want--;
diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h
index e179df99d105..7d6389d39031 100644
--- a/sys/sys/sf_buf.h
+++ b/sys/sys/sf_buf.h
@@ -38,7 +38,7 @@ extern int nsfbufspeak; /* Peak of nsfbufsused */
extern int nsfbufsused; /* Number of sendfile(2) bufs in use */
struct sf_buf *
- sf_buf_alloc(struct vm_page *m);
+ sf_buf_alloc(struct vm_page *m, int pri);
void sf_buf_free(struct sf_buf *sf);
void sf_buf_mext(void *addr, void *args);