From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Subject: Re: [PATCH] drivers/ata: print trim features at device initialization
Date: Sat, 8 Jun 2019 12:12:52 +0300 [thread overview]
Message-ID: <eebfb1cc-f6d0-580e-1d56-2af0f481a92f@yandex-team.ru> (raw)
In-Reply-To: <yq1wohxib7t.fsf@oracle.com>
On 07.06.2019 19:58, Martin K. Petersen wrote:
>
> Konstantin,
>
>> + if (dev->horkage & ATA_HORKAGE_NOTRIM)
>> + trim_status = "backlisted";
>
> blacklisted
Oops. My bad.
>
>> + else
>> + trim_status = "supported";
>> +
>> + if (!ata_fpdma_dsm_supported(dev))
>> + trim_queued = "no";
>> + else if (dev->horkage & ATA_HORKAGE_NO_NCQ_TRIM)
>> + trim_queued = "backlisted";
>
> ditto
>
>> + else
>> + trim_queued = "yes";
>
> Why is trim_status "supported" and trim_queued/trim_zero "yes"?
Hmm. This seems properties of trim, not independent features.
>
>> +
>> + if (!ata_id_has_zero_after_trim(id))
>> + trim_zero = "no";
>> + else if (dev->horkage & ATA_HORKAGE_ZERO_AFTER_TRIM)
>> + trim_zero = "yes";
>> + else
>> + trim_zero = "maybe";
>> +
>> + ata_dev_info(dev, "trim: %s, queued: %s, zero_after_trim: %s\n",
>> + trim_status, trim_queued, trim_zero);
>> + }
>> +
>
> Otherwise no particular objections. We were trying to limit noise during
> boot which is why this information originally went to sysfs instead of
> being printed during probe.
>
On 08.06.2019 11:25, Christoph Hellwig wrote:> On Fri, Jun 07, 2019 at 10:34:39AM +0300, Konstantin Khlebnikov wrote:
>
> Do we really need to spam dmesg with even more ATA crap? What about
> a sysfs file that can be read on demand instead?
>
Makes sense.
Trim state is exposed for ata_device: /sys/class/ata_device/devX.Y/trim
but there is no link from scsi device to ata device so they hard to match.
I'll think about it.
next prev parent reply other threads:[~2019-06-08 9:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 7:34 [PATCH] drivers/ata: print trim features at device initialization Konstantin Khlebnikov
2019-06-07 16:58 ` Martin K. Petersen
2019-06-08 9:12 ` Konstantin Khlebnikov [this message]
2019-06-08 14:13 ` Konstantin Khlebnikov
2019-06-09 21:37 ` James Bottomley
2019-06-10 7:49 ` Konstantin Khlebnikov
2019-06-10 22:48 ` James Bottomley
2019-06-14 13:49 ` Konstantin Khlebnikov
2019-06-14 14:54 ` James Bottomley
2019-06-08 8:25 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eebfb1cc-f6d0-580e-1d56-2af0f481a92f@yandex-team.ru \
--to=khlebnikov@yandex-team.ru \
--cc=axboe@kernel.dk \
--cc=dmtrmonakhov@yandex-team.ru \
--cc=hch@infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).