From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756883Ab2ECOYR (ORCPT ); Thu, 3 May 2012 10:24:17 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:58793 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756147Ab2ECOYN (ORCPT ); Thu, 3 May 2012 10:24:13 -0400 From: Venkatraman S To: , , , , CC: , , , , , , Venkatraman S Subject: [PATCH v2 03/16] block: add queue attributes to manage dpmg and swapin requests Date: Thu, 3 May 2012 19:53:02 +0530 Message-ID: <1336054995-22988-4-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.10.rc2 In-Reply-To: <1336054995-22988-1-git-send-email-svenkatr@ti.com> References: <1336054995-22988-1-git-send-email-svenkatr@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add block queue properties to identify and manage demand paging and swapin requests differently. Signed-off-by: Ilan Smith Signed-off-by: Alex Lemberg Signed-off-by: Venkatraman S --- include/linux/blkdev.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2aa2466..e9187d4 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -420,6 +420,8 @@ struct request_queue { #define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */ #define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */ #define QUEUE_FLAG_SAME_FORCE 18 /* force complete on same CPU */ +#define QUEUE_FLAG_EXP_DMPG 19 /* Expedite Demand paging requests */ +#define QUEUE_FLAG_EXP_SWAPIN 20 /* Expedit page swapping */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_STACKABLE) | \ @@ -502,6 +504,12 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) #define blk_queue_secdiscard(q) (blk_queue_discard(q) && \ test_bit(QUEUE_FLAG_SECDISCARD, &(q)->queue_flags)) +#define blk_queue_exp_dmpg(q) \ + test_bit(QUEUE_FLAG_EXP_DMPG, &(q)->queue_flags) + +#define blk_queue_exp_swapin(q) \ + test_bit(QUEUE_FLAG_EXP_SWAPIN, &(q)->queue_flags) + #define blk_noretry_request(rq) \ ((rq)->cmd_flags & (REQ_FAILFAST_DEV|REQ_FAILFAST_TRANSPORT| \ REQ_FAILFAST_DRIVER)) -- 1.7.10.rc2