2012-08-08 13:20:54

by Holger Kiehl

[permalink] [raw]
Subject: What happened to TRIM support for raid linear/0/1/10?

Hello,

I have been using the patches posted by Shaohua Li on 16th March 2012:

http://lkml.indiana.edu/hypermail/linux/kernel/1203.2/00048.html

for several month on a very busy file server (serving 9 million files
with 5.3 TiB daily) without any problems.

Is there any chance that these patches will go into the official kernel?
Or what is the reason that these patches are no applied?

I have attached the patch set in one big patch for 3.5. Please do not
use it since I am not sure if it is correct. Shaohua could you please
take a look if it is correct and maybe post a new one?

Personally, I would think that TRIM support MD would be a very good thing.

Regards,
Holger


Attachments:
md-trim-3.5.patch (10.96 kB)

2012-08-08 17:59:15

by Lutz Vieweg

[permalink] [raw]
Subject: Re: What happened to TRIM support for raid linear/0/1/10?

On 08/08/2012 03:10 PM, Holger Kiehl wrote:
> Personally, I would think that TRIM support MD would be a very good thing.

That's one thing I am waiting for, too.

We had to implement a somewhat clumsy user-space application which does
the trick for us - but that is an ugly work-around, as it has to allocate
most of the free space on a filesystem for at least a little while (to know
what blocks it can discard).

Without periodic discard runs, our SSD-equipped servers suffer a ~50% write
performance penalty, so this feature is not just a cosmetic issue to us.

Regards,

Lutz Vieweg

2012-08-09 03:25:25

by NeilBrown

[permalink] [raw]
Subject: Re: What happened to TRIM support for raid linear/0/1/10?

On Wed, 8 Aug 2012 13:10:51 +0000 (GMT) Holger Kiehl <[email protected]>
wrote:

> Hello,
>
> I have been using the patches posted by Shaohua Li on 16th March 2012:
>
> http://lkml.indiana.edu/hypermail/linux/kernel/1203.2/00048.html
>
> for several month on a very busy file server (serving 9 million files
> with 5.3 TiB daily) without any problems.
>
> Is there any chance that these patches will go into the official kernel?
> Or what is the reason that these patches are no applied?

I'm trying to appear to be an incompetent maintainer so that someone will
offer to take over. It isn't working yet. I'm probably scuttling the
attempt just by replying to this email - drat.

>
> I have attached the patch set in one big patch for 3.5. Please do not
> use it since I am not sure if it is correct. Shaohua could you please
> take a look if it is correct and maybe post a new one?
>
> Personally, I would think that TRIM support MD would be a very good thing.

Probably. Maybe if they get posted again I'll feel guilty and do something
about them.

One issue that needs to be fixed is that a few places assumed that the
"discard_zeros_data" flag is always set, which is not the case (else we
wouldn't have that flag). That was only a couple of places though, not a
wide spread problem.

NeilBrown



>
> Regards,
> Holger


Attachments:
signature.asc (828.00 B)

2012-08-09 05:15:03

by Shaohua Li

[permalink] [raw]
Subject: Re: What happened to TRIM support for raid linear/0/1/10?

2012/8/9 NeilBrown <[email protected]>:
> On Wed, 8 Aug 2012 13:10:51 +0000 (GMT) Holger Kiehl <[email protected]>
> wrote:
>
>> Hello,
>>
>> I have been using the patches posted by Shaohua Li on 16th March 2012:
>>
>> http://lkml.indiana.edu/hypermail/linux/kernel/1203.2/00048.html
>>
>> for several month on a very busy file server (serving 9 million files
>> with 5.3 TiB daily) without any problems.
>>
>> Is there any chance that these patches will go into the official kernel?
>> Or what is the reason that these patches are no applied?
>
> I'm trying to appear to be an incompetent maintainer so that someone will
> offer to take over. It isn't working yet. I'm probably scuttling the
> attempt just by replying to this email - drat.
>
>>
>> I have attached the patch set in one big patch for 3.5. Please do not
>> use it since I am not sure if it is correct. Shaohua could you please
>> take a look if it is correct and maybe post a new one?
>>
>> Personally, I would think that TRIM support MD would be a very good thing.
>
> Probably. Maybe if they get posted again I'll feel guilty and do something
> about them.
>
> One issue that needs to be fixed is that a few places assumed that the
> "discard_zeros_data" flag is always set, which is not the case (else we
> wouldn't have that flag). That was only a couple of places though, not a
> wide spread problem.

The big problem is SATA discard request merge is broken, while doing
MD discard will trigger discard request merge. In this form, I bet Neil will
not accept the patches. So not the problem MD discard patch itself.

Last time Martin said he is working on SCSI discard request merge
patches. That isn't happened yet. Maybe I should ping Jens
to disable discard request merge currently, it's broken for a long
time anyway.