lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Apr 2009 09:32:54 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Szabolcs Szakacsits <szaka@...s-3g.com>,
	Grant Grundler <grundler@...gle.com>,
	Linux IDE mailing list <linux-ide@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Jens Axboe <jens.axboe@...cle.com>,
	Arjan van de Ven <arjan@...radead.org>
Subject: Re: Implementing NVMHCI...

Linus Torvalds wrote:
> On Sun, 12 Apr 2009, Avi Kivity wrote:
>   
>> A quick test shows that it can.  I didn't try mmap(), but copying files around
>> worked.
>>     
>
> You being who you are, I'm assuming you're doing this in a virtual 
> environment, so you might be able to see the IO patterns..
>
>   

Yes.  I just used the Windows performance counters rather than mess with 
qemu for the test below.

> Can you tell if it does the IO in chunks of 16kB or smaller? That can be 
> hard to see with trivial tests (since any filesystem will try to chunk up 
> writes regardless of how small the cache entry is, and on file creation it 
> will have to write the full 16kB anyway just to initialize the newly 
> allocated blocks on disk), but there's a couple of things that should be 
> reasonably good litmus tests of what WNT does internally:
>
>  - create a big file, 

Just creating a 5GB file in a 64KB filesystem was interesting - Windows 
was throwing out 256KB I/Os even though I was generating 1MB writes  
(and cached too).  Looks like a paranoid IDE driver (qemu exposes a PIIX4).

> then rewrite just a few bytes in it, and look at the 
>    IO pattern of the result. Does it actually do the rewrite IO as one 
>    16kB IO, or does it do sub-blocking?
>   

It generates 4KB writes (I was generating aligned 512 byte overwrites).  
What's more interesting, it was also issuing 32KB reads to fill the 
cache, not 64KB.  Since the number of reads and writes per second is 
almost equal, it's not splitting a 64KB read into two.

>    If the latter, then the 16kB thing is just a filesystem layout issue, 
>    not an internal block-size issue, and WNT would likely have exactly the 
>    same issues as Linux.
>   

A 1 byte write on an ordinary file generates a RMW, same as a 4KB write 
on a 16KB block.  So long as the filesystem is just a layer behind the 
pagecache (which I think is the case on Windows), I don't see what 
issues it can have.

>  - can you tell how many small files it will cache in RAM without doing 
>    IO? If it always uses 16kB blocks for caching, it will be able to cache 
>    a _lot_ fewer files in the same amount of RAM than with a smaller block 
>    size.
>   

I'll do this later, but given the 32KB reads for the test above, I'm 
guessing it will cache pages, not blocks.

> Of course, the _really_ conclusive thing (in a virtualized environment) is 
> to just make the virtual disk only able to do 16kB IO accesses (and with 
> 16kB alignment). IOW, actually emulate a disk with a 16kB hard sector 
> size, and reporting a 16kB sector size to the READ CAPACITY command. If it 
> works then, then clearly WNT has no issues with bigger sectors.
>   

I don't think IDE supports this?  And Windows 2008 doesn't like the LSI 
emulated device we expose.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ