X-Git-Url: http://git.agner.ch/gitweb/?p=linux-drm-fsl-dcu.git;a=blobdiff_plain;f=fs%2Faio.c;h=c428871f10934a87aa4b5a7038b8c0519b6bc80a;hp=1b7893ecc29654f6d20cf420b24ee20dddbf9038;hb=c7fb90dfbef49b03e6f3fd6a32338e59cbcf34ee;hpb=c4e00f1d31c4c83d15162782491689229bd92527 diff --git a/fs/aio.c b/fs/aio.c index 1b7893ecc296..c428871f1093 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. */