For architectures not using direct map , and requiring real KVA page for
sf buf allocation, use wakeup() instead of wakeup_one() to notify sf buffer waiters about free buffer. sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given, and for simultaneous wakeup and signal delivery, msleep() returns EINTR/ERESTART despite the thread was selected for wakeup_one(). As result, we loose a wakeup, and some other waiter will not be woken up. Reported and tested by: az Reviewed by: alc, jhb MFC after: 1 week
This commit is contained in:
parent
14be64618e
commit
55aabb7fd1
@ -175,7 +175,7 @@ sf_buf_free(struct sf_buf *sf)
|
||||
sf->m = NULL;
|
||||
LIST_REMOVE(sf, list_entry);
|
||||
if (sf_buf_alloc_want > 0)
|
||||
wakeup_one(&sf_buf_freelist);
|
||||
wakeup(&sf_buf_freelist);
|
||||
}
|
||||
mtx_unlock(&sf_buf_lock);
|
||||
#endif
|
||||
|
@ -916,7 +916,7 @@ sf_buf_free(struct sf_buf *sf)
|
||||
LIST_REMOVE(sf, list_entry);
|
||||
#endif
|
||||
if (sf_buf_alloc_want > 0)
|
||||
wakeup_one(&sf_buf_freelist);
|
||||
wakeup(&sf_buf_freelist);
|
||||
}
|
||||
mtx_unlock(&sf_buf_lock);
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ sf_buf_free(struct sf_buf *sf)
|
||||
SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list);
|
||||
nsfbufsused--;
|
||||
if (sf_buf_alloc_want > 0)
|
||||
wakeup_one(&sf_freelist);
|
||||
wakeup(&sf_freelist);
|
||||
mtx_unlock(&sf_freelist.sf_lock);
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ sf_buf_free(struct sf_buf *sf)
|
||||
nsfbufsused--;
|
||||
|
||||
if (sf_buf_alloc_want > 0)
|
||||
wakeup_one(&sf_buf_freelist);
|
||||
wakeup(&sf_buf_freelist);
|
||||
}
|
||||
mtx_unlock(&sf_buf_lock);
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ sf_buf_free(struct sf_buf *sf)
|
||||
nsfbufsused--;
|
||||
|
||||
if (sf_buf_alloc_want > 0)
|
||||
wakeup_one(&sf_buf_freelist);
|
||||
wakeup(&sf_buf_freelist);
|
||||
}
|
||||
mtx_unlock(&sf_buf_lock);
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ sf_buf_free(struct sf_buf *sf)
|
||||
SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list);
|
||||
nsfbufsused--;
|
||||
if (sf_buf_alloc_want > 0)
|
||||
wakeup_one(&sf_freelist);
|
||||
wakeup(&sf_freelist);
|
||||
mtx_unlock(&sf_freelist.sf_lock);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user