The patch titled Subject: block: avoid unnecessary plug list flush has been added to the -mm tree. Its filename is block-avoid-unnecessary-plug-list-flush.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ From: Shaohua Li <shaohua.li@xxxxxxxxx> Subject: block: avoid unnecessary plug list flush get_request_wait() could sleep and flush the plug list. If the list is already flushed, don't flush again. Signed-off-by: Shaohua Li <shaohua.li@xxxxxxxxx> Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxx> --- block/blk-core.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff -puN block/blk-core.c~block-avoid-unnecessary-plug-list-flush block/blk-core.c --- a/block/blk-core.c~block-avoid-unnecessary-plug-list-flush +++ a/block/blk-core.c @@ -1296,15 +1296,17 @@ get_rq: */ if (list_empty(&plug->list)) trace_block_plug(q); - else if (!plug->should_sort) { - struct request *__rq; - - __rq = list_entry_rq(plug->list.prev); - if (__rq->q != q) - plug->should_sort = 1; + else { + if (!plug->should_sort) { + struct request *__rq; + + __rq = list_entry_rq(plug->list.prev); + if (__rq->q != q) + plug->should_sort = 1; + } + if (request_count >= BLK_MAX_REQUEST_COUNT) + blk_flush_plug_list(plug, false); } - if (request_count >= BLK_MAX_REQUEST_COUNT) - blk_flush_plug_list(plug, false); list_add_tail(&req->queuelist, &plug->list); drive_stat_acct(req, 1); } else { _ Subject: Subject: block: avoid unnecessary plug list flush Patches currently in -mm which might be from shaohua.li@xxxxxxxxx are origin.patch linux-next.patch x86-tlb-flush-avoid-superflous-leave_mm.patch block-avoid-unnecessary-plug-list-flush.patch block-add-missed-trace_block_plug.patch vmscan-add-block-plug-for-page-reclaim.patch vmscan-count-pages-into-balanced-for-zone-with-good-watermark.patch vmscan-promote-shared-file-mapped-pages.patch vmscan-activate-executable-pages-after-first-usage.patch intel_idle-fix-api-misuse.patch intel_idle-disable-auto_demotion-for-hotplugged-cpus.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html