[-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-17 Thread Mathieu Desnoyers
Hi, CCing lkml on this, * Yannick Brosseau (yannick.bross...@gmail.com) wrote: > Hi all, > > We discovered a performance regression in recent kernels with LTTng > related to the use of fadvise DONTNEED. > A call to this syscall is present in the LTTng consumer. > > The following kernel commit c

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-17 Thread Andrew Morton
On Mon, 17 Jun 2013 10:13:57 -0400 Mathieu Desnoyers wrote: > Hi, > > CCing lkml on this, > > * Yannick Brosseau (yannick.bross...@gmail.com) wrote: > > Hi all, > > > > We discovered a performance regression in recent kernels with LTTng > > related to the use of fadvise DONTNEED. > > A call t

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-18 Thread Mel Gorman
On Mon, Jun 17, 2013 at 02:24:59PM -0700, Andrew Morton wrote: > On Mon, 17 Jun 2013 10:13:57 -0400 Mathieu Desnoyers > wrote: > > > Hi, > > > > CCing lkml on this, > > > > * Yannick Brosseau (yannick.bross...@gmail.com) wrote: > > > Hi all, > > > > > > We discovered a performance regression

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-18 Thread Mel Gorman
On Tue, Jun 18, 2013 at 10:29:26AM +0100, Mel Gorman wrote: > On Mon, Jun 17, 2013 at 02:24:59PM -0700, Andrew Morton wrote: > > On Mon, 17 Jun 2013 10:13:57 -0400 Mathieu Desnoyers > > wrote: > > > > > Hi, > > > > > > CCing lkml on this, > > > > > > * Yannick Brosseau (yannick.bross...@gmail.

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-19 Thread Mathieu Desnoyers
* Mel Gorman (mgor...@suse.de) wrote: > On Tue, Jun 18, 2013 at 10:29:26AM +0100, Mel Gorman wrote: > > On Mon, Jun 17, 2013 at 02:24:59PM -0700, Andrew Morton wrote: > > > On Mon, 17 Jun 2013 10:13:57 -0400 Mathieu Desnoyers > > > wrote: > > > > > > > Hi, > > > > > > > > CCing lkml on this, >

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-20 Thread Mathieu Desnoyers
* Rob van der Heij (rvdh...@gmail.com) wrote: > Wouldn't you batch the calls to drop the pages from cache rather than drop > one packet at a time? By default for kernel tracing, lttng's trace packets are 1MB, so I consider the call to fadvise to be already batched by applying it to 1MB packets rat

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-24 Thread Dave Chinner
On Thu, Jun 20, 2013 at 08:20:16AM -0400, Mathieu Desnoyers wrote: > * Rob van der Heij (rvdh...@gmail.com) wrote: > > Wouldn't you batch the calls to drop the pages from cache rather than drop > > one packet at a time? > > By default for kernel tracing, lttng's trace packets are 1MB, so I > consi

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-02 Thread Mathieu Desnoyers
* Dave Chinner (da...@fromorbit.com) wrote: > On Thu, Jun 20, 2013 at 08:20:16AM -0400, Mathieu Desnoyers wrote: > > * Rob van der Heij (rvdh...@gmail.com) wrote: > > > Wouldn't you batch the calls to drop the pages from cache rather than drop > > > one packet at a time? > > > > By default for ker

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-02 Thread Mathieu Desnoyers
* Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: > * Dave Chinner (da...@fromorbit.com) wrote: > > On Thu, Jun 20, 2013 at 08:20:16AM -0400, Mathieu Desnoyers wrote: > > > * Rob van der Heij (rvdh...@gmail.com) wrote: > > > > Wouldn't you batch the calls to drop the pages from cache rath

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-03 Thread Mel Gorman
On Tue, Jul 02, 2013 at 08:55:14PM -0400, Mathieu Desnoyers wrote: > * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: > > * Dave Chinner (da...@fromorbit.com) wrote: > > > On Thu, Jun 20, 2013 at 08:20:16AM -0400, Mathieu Desnoyers wrote: > > > > * Rob van der Heij (rvdh...@gmail.com) wr

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-03 Thread Jeff Moyer
Mel Gorman writes: >> > I just tried replacing my sync_file_range()+fadvise() calls and instead >> > pass the O_DIRECT flag to open(). Unfortunately, I must be doing >> > something very wrong, because I get only 1/3rd of the throughput, and >> > the page cache fills up. Any idea why ? >> >> Sinc

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-03 Thread Yannick Brosseau
On 2013-07-03 04:47, Mel Gorman wrote: >> Given it is just a hint, we should be allowed to perform page >> > deactivation lazily. Is there any fundamental reason to wait for worker >> > threads on each CPU to complete their lru drain before returning from >> > fadvise() to user-space ? >> > > Only

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-03 Thread Dave Chinner
On Wed, Jul 03, 2013 at 10:53:08AM -0400, Jeff Moyer wrote: > Mel Gorman writes: > > >> > I just tried replacing my sync_file_range()+fadvise() calls and instead > >> > pass the O_DIRECT flag to open(). Unfortunately, I must be doing > >> > something very wrong, because I get only 1/3rd of the th

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-03 Thread Mathieu Desnoyers
* Dave Chinner (da...@fromorbit.com) wrote: > On Wed, Jul 03, 2013 at 10:53:08AM -0400, Jeff Moyer wrote: > > Mel Gorman writes: > > > > >> > I just tried replacing my sync_file_range()+fadvise() calls and instead > > >> > pass the O_DIRECT flag to open(). Unfortunately, I must be doing > > >> >

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-04 Thread Dave Chinner
On Wed, Jul 03, 2013 at 08:31:03PM -0400, Mathieu Desnoyers wrote: > * Dave Chinner (da...@fromorbit.com) wrote: > > On Wed, Jul 03, 2013 at 10:53:08AM -0400, Jeff Moyer wrote: > > > Mel Gorman writes: > > > > > > >> > I just tried replacing my sync_file_range()+fadvise() calls and > > > >> > in

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-04 Thread Mathieu Desnoyers
* Dave Chinner (da...@fromorbit.com) wrote: > On Wed, Jul 03, 2013 at 08:31:03PM -0400, Mathieu Desnoyers wrote: > > * Dave Chinner (da...@fromorbit.com) wrote: > > > On Wed, Jul 03, 2013 at 10:53:08AM -0400, Jeff Moyer wrote: > > > > Mel Gorman writes: > > > > > > > > >> > I just tried replacing

Re: [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-07-05 Thread Mel Gorman
On Wed, Jul 03, 2013 at 02:47:58PM -0400, Yannick Brosseau wrote: > On 2013-07-03 04:47, Mel Gorman wrote: > >> Given it is just a hint, we should be allowed to perform page > >> > deactivation lazily. Is there any fundamental reason to wait for worker > >> > threads on each CPU to complete their l

Re: [lttng-dev] [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-17 Thread Andrew Morton
On Mon, 17 Jun 2013 17:39:36 -0400 Rapha__l Beamonte wrote: > 2013/6/17 Andrew Morton > > > That change wasn't terribly efficient - if there are any unpopulated > > pages in the range (which is quite likely), fadvise() will now always > > call invalidate_mapping_pages() a second time. > > > >

Re: [lttng-dev] [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-17 Thread Mathieu Desnoyers
* Andrew Morton (a...@linux-foundation.org) wrote: > On Mon, 17 Jun 2013 17:39:36 -0400 Rapha__l Beamonte > wrote: > > > 2013/6/17 Andrew Morton > > > > > That change wasn't terribly efficient - if there are any unpopulated > > > pages in the range (which is quite likely), fadvise() will now a

Re: [lttng-dev] [-stable 3.8.1 performance regression] madvise POSIX_FADV_DONTNEED

2013-06-17 Thread Andrew Morton
On Mon, 17 Jun 2013 22:15:28 -0400 Mathieu Desnoyers wrote: > * Andrew Morton (a...@linux-foundation.org) wrote: > > On Mon, 17 Jun 2013 17:39:36 -0400 Rapha__l Beamonte > > wrote: > > > > > 2013/6/17 Andrew Morton > > > > > > > That change wasn't terribly efficient - if there are any unpop