Skip to content

Commit cdecbb3

Browse files
committed
Merge git://git.kvack.org/~bcrl/aio-fixes
Pull aio nested sleep annotation from Ben LaHaise, * git://git.kvack.org/~bcrl/aio-fixes: aio: annotate aio_read_event_ring for sleep patterns
2 parents 4e02370 + 9c9ce76 commit cdecbb3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/aio.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,13 @@ static long aio_read_events_ring(struct kioctx *ctx,
11401140
long ret = 0;
11411141
int copy_ret;
11421142

1143+
/*
1144+
* The mutex can block and wake us up and that will cause
1145+
* wait_event_interruptible_hrtimeout() to schedule without sleeping
1146+
* and repeat. This should be rare enough that it doesn't cause
1147+
* peformance issues. See the comment in read_events() for more detail.
1148+
*/
1149+
sched_annotate_sleep();
11431150
mutex_lock(&ctx->ring_lock);
11441151

11451152
/* Access to ->ring_pages here is protected by ctx->ring_lock. */

0 commit comments

Comments
 (0)