Re: [RFC]blk: mark discard request sync

From: Vivek Goyal
Date: Tue Mar 20 2012 - 12:48:02 EST


On Fri, Mar 16, 2012 at 03:40:14PM +0800, Shaohua Li wrote:
>
> Subject: blk: mark discard request sync
>
> discard is called in jbd for example. If discard is slowed down, all
> file operations could be impacted (eg, journal is full). And we always
> wait for discard to finish. So looks we should mark discard as sync.
>
> Signed-off-by: Shaohua Li <shli@xxxxxxxxxxxx>

This one is tricky and I am not sure what's the right thing to do.

Generally the philosophy seems to be that request is sync is somebody
is waiting on it. To me even on async writes somebody is waiting (either
file system or a writer which has been throttled). So if we don't do
async writes in reasonable amount of time, we start getting "task blocked
for more than 120 seconds" message.

Do you have some test cases to show how bad the problem is if we don't
issue discard as SYNC request.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/