projects/linux·commit cdecbb33

Merge git://git.kvack.org/~bcrl/aio-fixes

cdecbb33 · Linus Torvalds <[email protected]> · 2015-02-08 18:27:58 -08:00

Pull aio nested sleep annotation from Ben LaHaise,

* git://git.kvack.org/~bcrl/aio-fixes:
  aio: annotate aio_read_event_ring for sleep patterns
Commit
cdecbb336e64b8a846bf97c5a275dc94fdb1083d
Parents
4e02370f · 9c9ce763

Merge commit. Changes below are compared with the first parent: 4e02370f.

Changes

1 files changed · +7 −0

FileStatusAddDelContent
fs/aio.cmodified+7−0View file

fs/aio.c

View file
diff --git a/fs/aio.c b/fs/aio.c
index 1b7893e..c428871 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1140,6 +1140,13 @@ static long aio_read_events_ring(struct kioctx *ctx,
long ret = 0;
int copy_ret;
+ /*
+ * The mutex can block and wake us up and that will cause
+ * wait_event_interruptible_hrtimeout() to schedule without sleeping
+ * and repeat. This should be rare enough that it doesn't cause
+ * peformance issues. See the comment in read_events() for more detail.
+ */
+ sched_annotate_sleep();
mutex_lock(&ctx->ring_lock);
/* Access to ->ring_pages here is protected by ctx->ring_lock. */