From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: fio 3.2 References: <903d418b-bac4-104b-28e5-3c529efab7f5@kernel.dk> From: Jens Axboe Message-ID: Date: Wed, 29 Nov 2017 21:21:30 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: "Elliott, Robert (Persistent Memory)" , "Gavriliuk, Anton (HPS Ukraine)" , Rebecca Cran , Sitsofe Wheeler Cc: "fio@vger.kernel.org" , "Kani, Toshimitsu" List-ID: On 11/28/2017 09:13 PM, Elliott, Robert (Persistent Memory) wrote: > small_content_scramble has hardly been touched since 2011, so it probably > hasn't had much performance analysis. That's fair, would be a good thing to look at, especially since it's on by default. > One of the few changes made was to add an integer divide by 1000, which > is always slow (painfully slow on some CPUs): > > offset = ((io_u->start_time.tv_nsec/1000) ^ boffset) & 511; > > perf top doesn't show that taking time - I think the compiler realized > it could pull that calculation out of the loop and just do it once. Different > compilers and compiler options might not realize that. Yeah, int divides suck. This didn't used to be like this, it got added with the nsec conversion. I have fixed this up now. -- Jens Axboe