Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-09 Thread Michael Kerrisk (man-pages)
Hello Minchan On 02/09/2015 07:46 AM, Minchan Kim wrote: > Hello, Michael > > On Fri, Feb 06, 2015 at 04:41:12PM +0100, Michael Kerrisk (man-pages) wrote: >> On 02/05/2015 02:07 AM, Minchan Kim wrote: >>> Hello, >>> >>> On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote:

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-09 Thread Michael Kerrisk (man-pages)
Hello Minchan On 02/09/2015 07:46 AM, Minchan Kim wrote: Hello, Michael On Fri, Feb 06, 2015 at 04:41:12PM +0100, Michael Kerrisk (man-pages) wrote: On 02/05/2015 02:07 AM, Minchan Kim wrote: Hello, On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: On 4

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-08 Thread Minchan Kim
On Fri, Feb 06, 2015 at 04:57:50PM +0100, Michael Kerrisk (man-pages) wrote: > Hi Michael > > On 02/05/2015 04:41 PM, Michal Hocko wrote: > > On Wed 04-02-15 20:24:27, Michael Kerrisk wrote: > > [...] > >> So, how about this text: > >> > >> After a successful MADV_DONTNEED

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-08 Thread Minchan Kim
Hello, Michael On Fri, Feb 06, 2015 at 04:41:12PM +0100, Michael Kerrisk (man-pages) wrote: > On 02/05/2015 02:07 AM, Minchan Kim wrote: > > Hello, > > > > On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: > >> On 4 February 2015 at 18:02, Vlastimil Babka wrote: > >>>

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-08 Thread Minchan Kim
On Fri, Feb 06, 2015 at 04:57:50PM +0100, Michael Kerrisk (man-pages) wrote: Hi Michael On 02/05/2015 04:41 PM, Michal Hocko wrote: On Wed 04-02-15 20:24:27, Michael Kerrisk wrote: [...] So, how about this text: After a successful MADV_DONTNEED operation, the seman‐

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-08 Thread Minchan Kim
Hello, Michael On Fri, Feb 06, 2015 at 04:41:12PM +0100, Michael Kerrisk (man-pages) wrote: On 02/05/2015 02:07 AM, Minchan Kim wrote: Hello, On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: On 4 February 2015 at 18:02, Vlastimil Babka vba...@suse.cz wrote:

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-06 Thread Michal Hocko
On Fri 06-02-15 16:57:50, Michael Kerrisk wrote: [...] > > Yes, this wording is better because many users are not aware of > > MAP_ANON|MAP_SHARED being file backed in fact and mmap man page doesn't > > mention that. > > (Michal, would you have a text to propose to add to the mmap(2) page? >

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-06 Thread Michael Kerrisk (man-pages)
Hi Michael On 02/05/2015 04:41 PM, Michal Hocko wrote: > On Wed 04-02-15 20:24:27, Michael Kerrisk wrote: > [...] >> So, how about this text: >> >> After a successful MADV_DONTNEED operation, the seman‐ >> tics of memory access in the specified region are >>

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-06 Thread Michael Kerrisk (man-pages)
On 02/05/2015 02:07 AM, Minchan Kim wrote: > Hello, > > On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: >> On 4 February 2015 at 18:02, Vlastimil Babka wrote: >>> On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil, On 4

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-06 Thread Michal Hocko
On Fri 06-02-15 16:57:50, Michael Kerrisk wrote: [...] Yes, this wording is better because many users are not aware of MAP_ANON|MAP_SHARED being file backed in fact and mmap man page doesn't mention that. (Michal, would you have a text to propose to add to the mmap(2) page? Maybe it

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-06 Thread Michael Kerrisk (man-pages)
Hi Michael On 02/05/2015 04:41 PM, Michal Hocko wrote: On Wed 04-02-15 20:24:27, Michael Kerrisk wrote: [...] So, how about this text: After a successful MADV_DONTNEED operation, the seman‐ tics of memory access in the specified region are

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-06 Thread Michael Kerrisk (man-pages)
On 02/05/2015 02:07 AM, Minchan Kim wrote: Hello, On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: On 4 February 2015 at 18:02, Vlastimil Babka vba...@suse.cz wrote: On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil, On 4 February 2015

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-05 Thread Rik van Riel
On 02/02/2015 05:18 PM, Mel Gorman wrote: > On Mon, Feb 02, 2015 at 02:05:06PM -0800, Andrew Morton wrote: >> On Mon, 2 Feb 2015 16:55:25 + Mel Gorman wrote: >> >>> glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas >>> instead of creating new areans if the existing ones

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-05 Thread Michal Hocko
On Wed 04-02-15 20:24:27, Michael Kerrisk wrote: [...] > So, how about this text: > > After a successful MADV_DONTNEED operation, the seman‐ > tics of memory access in the specified region are > changed: subsequent accesses of pages in the range

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-05 Thread Michal Hocko
On Wed 04-02-15 20:24:27, Michael Kerrisk wrote: [...] So, how about this text: After a successful MADV_DONTNEED operation, the seman‐ tics of memory access in the specified region are changed: subsequent accesses of pages in the range

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-05 Thread Rik van Riel
On 02/02/2015 05:18 PM, Mel Gorman wrote: On Mon, Feb 02, 2015 at 02:05:06PM -0800, Andrew Morton wrote: On Mon, 2 Feb 2015 16:55:25 + Mel Gorman mgor...@suse.de wrote: glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas instead of creating new areans if the existing

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Minchan Kim
Hello, On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: > On 4 February 2015 at 18:02, Vlastimil Babka wrote: > > On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: > >> > >> Hello Vlastimil, > >> > >> On 4 February 2015 at 14:46, Vlastimil Babka wrote: >

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Michael Kerrisk (man-pages)
On 4 February 2015 at 18:02, Vlastimil Babka wrote: > On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: >> >> Hello Vlastimil, >> >> On 4 February 2015 at 14:46, Vlastimil Babka wrote: > > - that covers mlocking ok, not sure if the rest fits the "shared pages" > case >

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Vlastimil Babka
On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil, On 4 February 2015 at 14:46, Vlastimil Babka wrote: - that covers mlocking ok, not sure if the rest fits the "shared pages" case though. I dont see any check for other kinds of shared pages in the code. Agreed.

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Michael Kerrisk (man-pages)
Hello Vlastimil, On 4 February 2015 at 14:46, Vlastimil Babka wrote: > On 02/03/2015 05:20 PM, Michael Kerrisk (man-pages) wrote: >> >> On 02/03/2015 12:42 PM, Vlastimil Babka wrote: >>> >>> On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100,

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Vlastimil Babka
On 02/03/2015 05:20 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil Thanks for CCing me into this thread. NP On 02/03/2015 12:42 PM, Vlastimil Babka wrote: On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: It doesn't

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Vlastimil Babka
On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil, On 4 February 2015 at 14:46, Vlastimil Babka vba...@suse.cz wrote: - that covers mlocking ok, not sure if the rest fits the shared pages case though. I dont see any check for other kinds of shared pages in the code.

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Michael Kerrisk (man-pages)
On 4 February 2015 at 18:02, Vlastimil Babka vba...@suse.cz wrote: On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil, On 4 February 2015 at 14:46, Vlastimil Babka vba...@suse.cz wrote: - that covers mlocking ok, not sure if the rest fits the shared pages case

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Minchan Kim
Hello, On Wed, Feb 04, 2015 at 08:24:27PM +0100, Michael Kerrisk (man-pages) wrote: On 4 February 2015 at 18:02, Vlastimil Babka vba...@suse.cz wrote: On 02/04/2015 03:00 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil, On 4 February 2015 at 14:46, Vlastimil Babka vba...@suse.cz

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Vlastimil Babka
On 02/03/2015 05:20 PM, Michael Kerrisk (man-pages) wrote: Hello Vlastimil Thanks for CCing me into this thread. NP On 02/03/2015 12:42 PM, Vlastimil Babka wrote: On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: It doesn't

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-04 Thread Michael Kerrisk (man-pages)
Hello Vlastimil, On 4 February 2015 at 14:46, Vlastimil Babka vba...@suse.cz wrote: On 02/03/2015 05:20 PM, Michael Kerrisk (man-pages) wrote: On 02/03/2015 12:42 PM, Vlastimil Babka wrote: On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100,

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Minchan Kim
On Tue, Feb 03, 2015 at 12:42:53PM +0100, Vlastimil Babka wrote: > On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: > > On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: > >> [CC linux-api, man pages] > >> > >> On 02/02/2015 11:22 PM, Dave Hansen wrote: > >> > On 02/02/2015 08:55

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Michael Kerrisk (man-pages)
On 02/03/2015 04:21 PM, Michal Hocko wrote: > On Tue 03-02-15 11:16:00, Mel Gorman wrote: >> On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: > [...] >>> And if we agree that there is indeed no guarantee, what's the actual >>> semantic >>> difference from MADV_FREE? I guess none?

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Michael Kerrisk (man-pages)
Hello Vlastimil Thanks for CCing me into this thread. On 02/03/2015 12:42 PM, Vlastimil Babka wrote: > On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: >> On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: >>> [CC linux-api, man pages] >>> >>> On 02/02/2015 11:22 PM, Dave Hansen

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Michal Hocko
On Tue 03-02-15 11:16:00, Mel Gorman wrote: > On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [...] > > And if we agree that there is indeed no guarantee, what's the actual > > semantic > > difference from MADV_FREE? I guess none? So there's only a possible > > perfomance > >

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Vlastimil Babka
On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: > On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: >> [CC linux-api, man pages] >> >> On 02/02/2015 11:22 PM, Dave Hansen wrote: >> > On 02/02/2015 08:55 AM, Mel Gorman wrote: >> >> This patch identifies when a thread is frequently

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Tue, Feb 03, 2015 at 12:47:56PM +0200, Kirill A. Shutemov wrote: > On Tue, Feb 03, 2015 at 09:47:18AM +, Mel Gorman wrote: > > On Mon, Feb 02, 2015 at 02:22:36PM -0800, Dave Hansen wrote: > > > On 02/02/2015 08:55 AM, Mel Gorman wrote: > > > > This patch identifies when a thread is

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: > [CC linux-api, man pages] > > On 02/02/2015 11:22 PM, Dave Hansen wrote: > > On 02/02/2015 08:55 AM, Mel Gorman wrote: > >> This patch identifies when a thread is frequently calling MADV_DONTNEED > >> on the same region of memory

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Kirill A. Shutemov
On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: > [CC linux-api, man pages] > > On 02/02/2015 11:22 PM, Dave Hansen wrote: > > On 02/02/2015 08:55 AM, Mel Gorman wrote: > >> This patch identifies when a thread is frequently calling MADV_DONTNEED > >> on the same region of memory

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Mon, Feb 02, 2015 at 02:35:41PM -0800, Andrew Morton wrote: > On Mon, 2 Feb 2015 22:18:24 + Mel Gorman wrote: > > > > Is there something > > > preventing this from being addressed within glibc? > > > > I doubt it other than I expect they'll punt it back and blame either the > >

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Kirill A. Shutemov
On Tue, Feb 03, 2015 at 09:47:18AM +, Mel Gorman wrote: > On Mon, Feb 02, 2015 at 02:22:36PM -0800, Dave Hansen wrote: > > On 02/02/2015 08:55 AM, Mel Gorman wrote: > > > This patch identifies when a thread is frequently calling MADV_DONTNEED > > > on the same region of memory and starts

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Mon, Feb 02, 2015 at 02:22:36PM -0800, Dave Hansen wrote: > On 02/02/2015 08:55 AM, Mel Gorman wrote: > > This patch identifies when a thread is frequently calling MADV_DONTNEED > > on the same region of memory and starts ignoring the hint. On an 8-core > > single-socket machine this was the

MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Vlastimil Babka
[CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: > On 02/02/2015 08:55 AM, Mel Gorman wrote: >> This patch identifies when a thread is frequently calling MADV_DONTNEED >> on the same region of memory and starts ignoring the hint. On an 8-core >> single-socket machine this was

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Michal Hocko
On Tue 03-02-15 11:16:00, Mel Gorman wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [...] And if we agree that there is indeed no guarantee, what's the actual semantic difference from MADV_FREE? I guess none? So there's only a possible perfomance difference?

MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Vlastimil Babka
[CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling MADV_DONTNEED on the same region of memory and starts ignoring the hint. On an 8-core single-socket machine this was the

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling MADV_DONTNEED on the same region of memory and starts

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Tue, Feb 03, 2015 at 12:47:56PM +0200, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:47:18AM +, Mel Gorman wrote: On Mon, Feb 02, 2015 at 02:22:36PM -0800, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Vlastimil Babka
On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Michael Kerrisk (man-pages)
On 02/03/2015 04:21 PM, Michal Hocko wrote: On Tue 03-02-15 11:16:00, Mel Gorman wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [...] And if we agree that there is indeed no guarantee, what's the actual semantic difference from MADV_FREE? I guess none? So there's

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Michael Kerrisk (man-pages)
Hello Vlastimil Thanks for CCing me into this thread. On 02/03/2015 12:42 PM, Vlastimil Babka wrote: On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: On

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Kirill A. Shutemov
On Tue, Feb 03, 2015 at 09:47:18AM +, Mel Gorman wrote: On Mon, Feb 02, 2015 at 02:22:36PM -0800, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling MADV_DONTNEED on the same region of memory and starts ignoring the

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Mon, Feb 02, 2015 at 02:35:41PM -0800, Andrew Morton wrote: On Mon, 2 Feb 2015 22:18:24 + Mel Gorman mgor...@suse.de wrote: Is there something preventing this from being addressed within glibc? I doubt it other than I expect they'll punt it back and blame either the

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Kirill A. Shutemov
On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling MADV_DONTNEED on the same region of memory and starts

Re: MADV_DONTNEED semantics? Was: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Minchan Kim
On Tue, Feb 03, 2015 at 12:42:53PM +0100, Vlastimil Babka wrote: On 02/03/2015 11:53 AM, Kirill A. Shutemov wrote: On Tue, Feb 03, 2015 at 09:19:15AM +0100, Vlastimil Babka wrote: [CC linux-api, man pages] On 02/02/2015 11:22 PM, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-03 Thread Mel Gorman
On Mon, Feb 02, 2015 at 02:22:36PM -0800, Dave Hansen wrote: On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling MADV_DONTNEED on the same region of memory and starts ignoring the hint. On an 8-core single-socket machine this was the impact on

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Davidlohr Bueso
On Mon, 2015-02-02 at 14:35 -0800, Andrew Morton wrote: > On Mon, 2 Feb 2015 22:18:24 + Mel Gorman wrote: > > > > Is there something > > > preventing this from being addressed within glibc? > > > > I doubt it other than I expect they'll punt it back and blame either the > > application for

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Andrew Morton
On Mon, 2 Feb 2015 22:18:24 + Mel Gorman wrote: > > Is there something > > preventing this from being addressed within glibc? > > I doubt it other than I expect they'll punt it back and blame either the > application for being stupid or the kernel for being slow. *Is* the application

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Dave Hansen
On 02/02/2015 08:55 AM, Mel Gorman wrote: > This patch identifies when a thread is frequently calling MADV_DONTNEED > on the same region of memory and starts ignoring the hint. On an 8-core > single-socket machine this was the impact on ebizzy using glibc 2.19. The manpage, at least, claims that

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Mel Gorman
On Mon, Feb 02, 2015 at 02:05:06PM -0800, Andrew Morton wrote: > On Mon, 2 Feb 2015 16:55:25 + Mel Gorman wrote: > > > glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas > > instead of creating new areans if the existing ones were contended. > > The decision appears to

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Andrew Morton
On Mon, 2 Feb 2015 16:55:25 + Mel Gorman wrote: > glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas > instead of creating new areans if the existing ones were contended. > The decision appears to have been made so the allocator scales better but the > downside is that

[RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Mel Gorman
glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas instead of creating new areans if the existing ones were contended. The decision appears to have been made so the allocator scales better but the downside is that madvise(MADV_DONTNEED) is now called for these per-thread areans

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Mel Gorman
On Mon, Feb 02, 2015 at 02:05:06PM -0800, Andrew Morton wrote: On Mon, 2 Feb 2015 16:55:25 + Mel Gorman mgor...@suse.de wrote: glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas instead of creating new areans if the existing ones were contended. The decision

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Andrew Morton
On Mon, 2 Feb 2015 16:55:25 + Mel Gorman mgor...@suse.de wrote: glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas instead of creating new areans if the existing ones were contended. The decision appears to have been made so the allocator scales better but the downside

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Dave Hansen
On 02/02/2015 08:55 AM, Mel Gorman wrote: This patch identifies when a thread is frequently calling MADV_DONTNEED on the same region of memory and starts ignoring the hint. On an 8-core single-socket machine this was the impact on ebizzy using glibc 2.19. The manpage, at least, claims that we

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Andrew Morton
On Mon, 2 Feb 2015 22:18:24 + Mel Gorman mgor...@suse.de wrote: Is there something preventing this from being addressed within glibc? I doubt it other than I expect they'll punt it back and blame either the application for being stupid or the kernel for being slow. *Is* the

Re: [RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Davidlohr Bueso
On Mon, 2015-02-02 at 14:35 -0800, Andrew Morton wrote: On Mon, 2 Feb 2015 22:18:24 + Mel Gorman mgor...@suse.de wrote: Is there something preventing this from being addressed within glibc? I doubt it other than I expect they'll punt it back and blame either the application

[RFC PATCH] mm: madvise: Ignore repeated MADV_DONTNEED hints

2015-02-02 Thread Mel Gorman
glibc malloc changed behaviour in glibc 2.10 to have per-thread arenas instead of creating new areans if the existing ones were contended. The decision appears to have been made so the allocator scales better but the downside is that madvise(MADV_DONTNEED) is now called for these per-thread areans