Message ID | 20100705160023S.fujita.tomonori@lab.ntt.co.jp |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
On Mon, Jul 05, 2010 at 04:00:44PM +0900, FUJITA Tomonori wrote: > Did you tested my discard branch, right? I tested the patch that you sent out back then. > Wired, I've just got Intel SSD X25-M drives and mkfs.xfs worked well. What codebase were you testing on? Sorry, but curently I'm a bit lost in the maze of patches. I've got both and intel and an OCZ SSD (right now I'm travelling with only access to the OCZ actually) and I'd like to test the latest variant again. -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05/07/10 03:24 PM, Christoph Hellwig wrote: > > What codebase were you testing on? Sorry, but curently I'm a bit lost > in the maze of patches. I've got both and intel and an OCZ SSD (right > now I'm travelling with only access to the OCZ actually) and I'd like > to test the latest variant again. .. Speaking of which.. I have recently noticed that some OCZ drives fail TRIM commands when issued for the final sector of the drive.. which happens by default with "mke2fs -t ext4". So I now partition those to not include the final sector. Keep your eyes peeled for stuff like that. Cheers -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> On 05/07/10 03:24 PM, Christoph Hellwig wrote: >> >> What codebase were you testing on? Sorry, but curently I'm a bit lost >> in the maze of patches. I've got both and intel and an OCZ SSD .. Do you, or anyone else with one, know what the upper limit is on TRIM operations with the Intel SSDs ? I need to know the maximum amount of TRIM ranges they will process in a single command. Eg. Indilinx-based SSDs don't appear to have a limit -- they'll accept a TRIM command with thousands of LBA ranges included. Sandforce-based SSDs appear to restrict things to max 4KB of range data. So.. what about Intel? Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 07/05/2010 05:54 PM, Mark Lord wrote: >> On 05/07/10 03:24 PM, Christoph Hellwig wrote: >>> >>> What codebase were you testing on? Sorry, but curently I'm a bit lost >>> in the maze of patches. I've got both and intel and an OCZ SSD > .. > > Do you, or anyone else with one, know what the upper limit is on > TRIM operations with the Intel SSDs ? > > I need to know the maximum amount of TRIM ranges they will process > in a single command. > > Eg. Indilinx-based SSDs don't appear to have a limit -- they'll accept > a TRIM command with thousands of LBA ranges included. > > Sandforce-based SSDs appear to restrict things to max 4KB of range data. > > So.. what about Intel? Lovely :( I wonder if we could test for that limit at mke2fs time, or similar. Seeing a 4k limit on other SSDs would not surprise me. Or even a 512-b limit. Jeff -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 5 Jul 2010 21:24:13 +0200 Christoph Hellwig <hch@lst.de> wrote: > > Wired, I've just got Intel SSD X25-M drives and mkfs.xfs worked well. > > What codebase were you testing on? Sorry, but curently I'm a bit lost > in the maze of patches. I've got both and intel and an OCZ SSD (right > now I'm travelling with only access to the OCZ actually) and I'd like > to test the latest variant again. I tested: git://git.kernel.org/pub/scm/linux/kernel/git/tomo/linux-2.6-misc.git discard I rebased the changes against Jens' for-2.6.36 and I've just sent the latest patch. -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10-07-05 05:54 PM, Mark Lord wrote: >> On 05/07/10 03:24 PM, Christoph Hellwig wrote: >>> >>> What codebase were you testing on? Sorry, but curently I'm a bit lost >>> in the maze of patches. I've got both and intel and an OCZ SSD > .. > > Do you, or anyone else with one, know what the upper limit is on > TRIM operations with the Intel SSDs ? > > I need to know the maximum amount of TRIM ranges they will process > in a single command. > > Eg. Indilinx-based SSDs don't appear to have a limit -- they'll accept > a TRIM command with thousands of LBA ranges included. > > Sandforce-based SSDs appear to restrict things to max 4KB of range data. > > So.. what about Intel? Well, I still don't know about Intel drives -- anyone? But for the latest hardware, some manufacturers are now reporting their TRIM limits in word[105] of the identify data, as described (optional) in the latest draft ATA ACS-2 specs. It appears that Sandforce drives officially only allow 512-bytes of range data. So I'll limit hdparm's TRIM functions to match word[105] when it is specified. The Indilinx drives I have here don't report anything in word[105], though. Cheers -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 0a8cd34..70b6b3d 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3020,6 +3020,9 @@ static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc) ata_qc_set_pc_nbytes(qc); + printk("%s %d: %p %d %d %d\n", __func__, __LINE__, scmd, + scsi_bufflen(scmd), qc->extrabytes, size); + return 0; invalid_fld: diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index ad0ed21..9e98d0b 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -838,6 +838,13 @@ void scsi_finish_command(struct scsi_cmnd *cmd) "(result %x)\n", cmd->result)); good_bytes = scsi_bufflen(cmd); + + if (cmd->request->cmd_flags & REQ_DISCARD) + printk("%s %d: %p %d %d %d %u %d\n", __func__, __LINE__, + cmd->request, scsi_bufflen(cmd), good_bytes, + scsi_get_resid(cmd), cmd->request->errors, + cmd->result); + if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) { int old_good_bytes = good_bytes; drv = scsi_cmd_to_driver(cmd); @@ -849,9 +856,16 @@ void scsi_finish_command(struct scsi_cmnd *cmd) * residue if drv->done() error processing indicates no * change to the completion length. */ + + if (cmd->request->cmd_flags & REQ_DISCARD) + printk("%s %d: %p %d %d %d\n", __func__, __LINE__, + cmd->request, good_bytes, old_good_bytes, + scsi_get_resid(cmd)); + if (good_bytes == old_good_bytes) good_bytes -= scsi_get_resid(cmd); } + scsi_io_completion(cmd, good_bytes); } EXPORT_SYMBOL(scsi_finish_command); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 8c1b084..f92bbff 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -464,6 +464,10 @@ static int scsi_setup_discard_cmnd(struct scsi_device *sdp, struct request *rq) } blk_add_request_payload(rq, page, len); + + printk("%s %d: %p %d %d\n", __func__, __LINE__, rq, sdkp->unmap, + len); + return scsi_setup_blk_pc_cmnd(sdp, rq); }