How do I detect a block device is being used as swap inside its request queue handler?

April 16th, 2012 - 06:40 am ET by Richard Yao | Report spam

Dear Linus Torvalds et al,

I am having some trouble with an out of tree module for a virtual block
device driver. I need to disable the direct reclaim path when the device
is used as swap. I cannot see a way to detect that the device is being
used as swap, so I am currently disabling it unconditionally.

Is there a clean way to detect that the block device is being used as
swap? I am not subscribed to the list, so please CC replies to me.

Yours truly,
Richard Yao




To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 1 replyReplies Make a reply

Similar topics

Replies

#1 Richard Yao
April 16th, 2012 - 07:00 am ET | Report spam

On 04/16/12 06:31, Richard Yao wrote:
Dear Linus Torvalds et al,

I am having some trouble with an out of tree module for a virtual block
device driver. I need to disable the direct reclaim path when the device
is used as swap. I cannot see a way to detect that the device is being
used as swap, so I am currently disabling it unconditionally.

Is there a clean way to detect that the block device is being used as
swap? I am not subscribed to the list, so please CC replies to me.

Yours truly,
Richard Yao




Please disregard my previous email. I just discovered a deadlock that
can occur if this were done.




To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search