Re: [RFC]swap: don't do discard if no discard option added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 21 Mar 2012, Shaohua Li wrote:
> Holger uses raid for swap. We currently didn't do discard request
> merge as low SCSI driver doesn't allow. So for the raid0 case, we
> will split big discard request to chunk size, which is 512k. This will
> increase discard request number. This can be fixed later.

Are you sure that's a significant factor?  I can certainly imagine it
magnifying the issue, but only Vertex2 has been reported as a problem.

> But on
> the other hand, if user doesn't explictly enable discard, why enable
> it? Like fs, we didn't do runtime discard and only run trim occasionally

Historic really: swap discard went in early, when it sounded like just
the right thing for swap, and we imagined that vendors would implement
it sensibly if they implemented it at all.

There appeared to be no need for such a flag at that time.  But once
different firmwares appeared, and also block developers switched discard
over from using a barrier to waiting for completion, the use of discard
when allocating fresh clusters became often much slower: so we added the
flag for that case.

The use of discard at swapon time still appeared to be a worthwhile win,
not needing any flag: swapon is indeed occasional.  But now the Vertex2
has shown just how unbearable that can be.

> since discard is slow.

On the Vertex2 - or do you know of others which pose this problem?

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]