소스 검색

block: add comment on why we save and disable interrupts in flush_plug_list()

It's done at the top to avoid doing it for every queue we unplug.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Jens Axboe 14 년 전
부모
커밋
188112722c
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      block/blk-core.c

+ 5 - 0
block/blk-core.c

@@ -2696,6 +2696,11 @@ static void flush_plug_list(struct blk_plug *plug)
 
 	q = NULL;
 	depth = 0;
+
+	/*
+	 * Save and disable interrupts here, to avoid doing it for every
+	 * queue lock we have to take.
+	 */
 	local_irq_save(flags);
 	while (!list_empty(&list)) {
 		rq = list_entry_rq(list.next);