Flexible I/O Tester development
 help / color / mirror / Atom feed
* Windows and TRIM support - files, not devices
@ 2017-01-28  1:05 Rebecca Cran
  2017-01-28 10:13 ` Sitsofe Wheeler
  2018-04-20  7:15 ` Sitsofe Wheeler
  0 siblings, 2 replies; 7+ messages in thread
From: Rebecca Cran @ 2017-01-28  1:05 UTC (permalink / raw)
  To: fio

I've been looking at the TRIM support in Windows 8 and newer, and have 
come across a potential problem. Other OSes use TRIM on a physical/block 
device, but Windows only provides support for TRIM on files.


Would it still be useful to implement in fio?


-- 

Rebecca


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows and TRIM support - files, not devices
  2017-01-28  1:05 Windows and TRIM support - files, not devices Rebecca Cran
@ 2017-01-28 10:13 ` Sitsofe Wheeler
  2017-01-28 13:01   ` Sitsofe Wheeler
  2018-04-20  7:15 ` Sitsofe Wheeler
  1 sibling, 1 reply; 7+ messages in thread
From: Sitsofe Wheeler @ 2017-01-28 10:13 UTC (permalink / raw)
  To: Rebecca Cran; +Cc: fio@vger.kernel.org

Hi,

On 28 January 2017 at 01:05, Rebecca Cran <rebecca@bluestop.org> wrote:
> I've been looking at the TRIM support in Windows 8 and newer, and have come
> across a potential problem. Other OSes use TRIM on a physical/block device,
> but Windows only provides support for TRIM on files.

What happens when using Hyper-V with raw disks that support thin
provisioning? Is there some secret kernel only method that converts
guest requests to the appropriate ATA/SCSI command in that case?

(https://msdn.microsoft.com/en-us/windows/hardware/drivers/storage/thin-provisioning
wasn't much help)

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows and TRIM support - files, not devices
  2017-01-28 10:13 ` Sitsofe Wheeler
@ 2017-01-28 13:01   ` Sitsofe Wheeler
  2017-01-29  1:54     ` Rebecca Cran
  0 siblings, 1 reply; 7+ messages in thread
From: Sitsofe Wheeler @ 2017-01-28 13:01 UTC (permalink / raw)
  To: Rebecca Cran; +Cc: fio@vger.kernel.org

On 28 January 2017 at 10:13, Sitsofe Wheeler <sitsofe@gmail.com> wrote:
> Hi,
>
> On 28 January 2017 at 01:05, Rebecca Cran <rebecca@bluestop.org> wrote:
>> I've been looking at the TRIM support in Windows 8 and newer, and have come
>> across a potential problem. Other OSes use TRIM on a physical/block device,
>> but Windows only provides support for TRIM on files.
>
> What happens when using Hyper-V with raw disks that support thin
> provisioning? Is there some secret kernel only method that converts
> guest requests to the appropriate ATA/SCSI command in that case?
>
> (https://msdn.microsoft.com/en-us/windows/hardware/drivers/storage/thin-provisioning
> wasn't much help)

https://msdn.microsoft.com/en-us/library/windows/hardware/dn653576(v=vs.85).aspx
hints that "applications should use the DSM IOCTLs to perform
UNMAP/TRIM" but I've read elsewhere that "[DeviceDsmAction_Trim]
is not supported for user-mode applications" -
https://msdn.microsoft.com/en-us/library/windows/desktop/ee907416(v=vs.85).aspx
.

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows and TRIM support - files, not devices
  2017-01-28 13:01   ` Sitsofe Wheeler
@ 2017-01-29  1:54     ` Rebecca Cran
  0 siblings, 0 replies; 7+ messages in thread
From: Rebecca Cran @ 2017-01-29  1:54 UTC (permalink / raw)
  To: Sitsofe Wheeler; +Cc: fio@vger.kernel.org

On 1/28/2017 6:01 AM, Sitsofe Wheeler wrote:
>
> https://msdn.microsoft.com/en-us/library/windows/hardware/dn653576(v=vs.85).aspx
> hints that "applications should use the DSM IOCTLs to perform
> UNMAP/TRIM" but I've read elsewhere that "[DeviceDsmAction_Trim]
> is not supported for user-mode applications" -
> https://msdn.microsoft.com/en-us/library/windows/desktop/ee907416(v=vs.85).aspx
> .

Thanks. Since the former page is from 2012 and the latter has no date on 
it, I suspect the one saying it's not supported for applications is 
probably more recent and correct, unfortunately.

-- 
Rebecca

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows and TRIM support - files, not devices
  2017-01-28  1:05 Windows and TRIM support - files, not devices Rebecca Cran
  2017-01-28 10:13 ` Sitsofe Wheeler
@ 2018-04-20  7:15 ` Sitsofe Wheeler
  2018-04-20 15:46   ` Rebecca Cran
  1 sibling, 1 reply; 7+ messages in thread
From: Sitsofe Wheeler @ 2018-04-20  7:15 UTC (permalink / raw)
  To: Rebecca Cran; +Cc: fio

Hi,

On 28 January 2017 at 01:05, Rebecca Cran <rebecca@bluestop.org> wrote:
> I've been looking at the TRIM support in Windows 8 and newer, and have come
> across a potential problem. Other OSes use TRIM on a physical/block device,
> but Windows only provides support for TRIM on files.

How far did you get with this? I recently attempted something over in
https://github.com/sitsofe/fio/commits/win_trim but I've found the
requirements to use mean the disk has to support deterministic read
after TRIM (DRAT) and read zero after TRIM (RZAT) which mean the it
works in less locations than things like Linux's TRIM. I've found the
occasional new SSD, Azure disks and things like mounted VHDs were the
only things it would work on...

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows and TRIM support - files, not devices
  2018-04-20  7:15 ` Sitsofe Wheeler
@ 2018-04-20 15:46   ` Rebecca Cran
  2018-04-30 20:24     ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Rebecca Cran @ 2018-04-20 15:46 UTC (permalink / raw)
  To: Sitsofe Wheeler; +Cc: fio

On 04/20/18 01:15, Sitsofe Wheeler wrote:

> On 28 January 2017 at 01:05, Rebecca Cran <rebecca@bluestop.org> wrote:
>> I've been looking at the TRIM support in Windows 8 and newer, and have come
>> across a potential problem. Other OSes use TRIM on a physical/block device,
>> but Windows only provides support for TRIM on files.
> 
> How far did you get with this?

I didn't do any more work on it after realizing it only worked on files.

-- 
Rebecca

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Windows and TRIM support - files, not devices
  2018-04-20 15:46   ` Rebecca Cran
@ 2018-04-30 20:24     ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2018-04-30 20:24 UTC (permalink / raw)
  To: Rebecca Cran, Sitsofe Wheeler; +Cc: fio

On 4/20/18 9:46 AM, Rebecca Cran wrote:
> On 04/20/18 01:15, Sitsofe Wheeler wrote:
> 
>> On 28 January 2017 at 01:05, Rebecca Cran <rebecca@bluestop.org> wrote:
>>> I've been looking at the TRIM support in Windows 8 and newer, and have come
>>> across a potential problem. Other OSes use TRIM on a physical/block device,
>>> but Windows only provides support for TRIM on files.
>>
>> How far did you get with this?
> 
> I didn't do any more work on it after realizing it only worked on files.

Missed this originally - files is totally fine, for what it's worth, on
Linux we could map this to hole punching too. So I don't think that's
a show stopper at all, it'd be perfectly possible to define trim based
workloads just on files. In fact, that's more flexible that what we
currently support on Linux.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-30 20:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-28  1:05 Windows and TRIM support - files, not devices Rebecca Cran
2017-01-28 10:13 ` Sitsofe Wheeler
2017-01-28 13:01   ` Sitsofe Wheeler
2017-01-29  1:54     ` Rebecca Cran
2018-04-20  7:15 ` Sitsofe Wheeler
2018-04-20 15:46   ` Rebecca Cran
2018-04-30 20:24     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox