Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-23 Thread Michal Hocko
On Fri 20-05-16 15:57:08, Vlastimil Babka wrote: [...] > From: Vlastimil Babka > Date: Wed, 4 May 2016 13:40:03 +0200 > Subject: [PATCH] mm, thp: remove __GFP_NORETRY from khugepaged and madvised > allocations > > After the previous patch, we can distinguish costly allocations

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-23 Thread Michal Hocko
On Fri 20-05-16 15:57:08, Vlastimil Babka wrote: [...] > From: Vlastimil Babka > Date: Wed, 4 May 2016 13:40:03 +0200 > Subject: [PATCH] mm, thp: remove __GFP_NORETRY from khugepaged and madvised > allocations > > After the previous patch, we can distinguish costly allocations that should be >

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-20 Thread Vlastimil Babka
On 05/18/2016 05:24 PM, Michal Hocko wrote: >> >> So the following patch attempts what you suggest, if I understand you >> correctly. GFP_TRANSHUGE includes all possible flag, and then they are >> removed as needed. I don't really think it helps code readability >> though. > > yeah it is ugly

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-20 Thread Vlastimil Babka
On 05/18/2016 05:24 PM, Michal Hocko wrote: >> >> So the following patch attempts what you suggest, if I understand you >> correctly. GFP_TRANSHUGE includes all possible flag, and then they are >> removed as needed. I don't really think it helps code readability >> though. > > yeah it is ugly

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-18 Thread Michal Hocko
On Wed 18-05-16 13:59:53, Vlastimil Babka wrote: > On 05/13/2016 02:05 PM, Michal Hocko wrote: > > On Fri 13-05-16 10:23:31, Vlastimil Babka wrote: > >> On 05/12/2016 06:20 PM, Michal Hocko wrote: > >>> On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: > >>> [...] > diff --git

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-18 Thread Michal Hocko
On Wed 18-05-16 13:59:53, Vlastimil Babka wrote: > On 05/13/2016 02:05 PM, Michal Hocko wrote: > > On Fri 13-05-16 10:23:31, Vlastimil Babka wrote: > >> On 05/12/2016 06:20 PM, Michal Hocko wrote: > >>> On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: > >>> [...] > diff --git

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-18 Thread Vlastimil Babka
On 05/13/2016 02:05 PM, Michal Hocko wrote: > On Fri 13-05-16 10:23:31, Vlastimil Babka wrote: >> On 05/12/2016 06:20 PM, Michal Hocko wrote: >>> On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: >>> [...] diff --git a/include/linux/gfp.h b/include/linux/gfp.h index

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-18 Thread Vlastimil Babka
On 05/13/2016 02:05 PM, Michal Hocko wrote: > On Fri 13-05-16 10:23:31, Vlastimil Babka wrote: >> On 05/12/2016 06:20 PM, Michal Hocko wrote: >>> On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: >>> [...] diff --git a/include/linux/gfp.h b/include/linux/gfp.h index

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-13 Thread Michal Hocko
On Fri 13-05-16 10:23:31, Vlastimil Babka wrote: > On 05/12/2016 06:20 PM, Michal Hocko wrote: > > On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: > > [...] > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > > index 570383a41853..0cb09714d960 100644 > > > --- a/include/linux/gfp.h >

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-13 Thread Michal Hocko
On Fri 13-05-16 10:23:31, Vlastimil Babka wrote: > On 05/12/2016 06:20 PM, Michal Hocko wrote: > > On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: > > [...] > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > > index 570383a41853..0cb09714d960 100644 > > > --- a/include/linux/gfp.h >

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-13 Thread Vlastimil Babka
On 05/12/2016 06:20 PM, Michal Hocko wrote: On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: [...] diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 570383a41853..0cb09714d960 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -256,8 +256,7 @@ struct vm_area_struct;

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-13 Thread Vlastimil Babka
On 05/12/2016 06:20 PM, Michal Hocko wrote: On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: [...] diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 570383a41853..0cb09714d960 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -256,8 +256,7 @@ struct vm_area_struct;

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-12 Thread Michal Hocko
On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: [...] > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index 570383a41853..0cb09714d960 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -256,8 +256,7 @@ struct vm_area_struct; > #define GFP_HIGHUSER (GFP_USER |

Re: [RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-12 Thread Michal Hocko
On Tue 10-05-16 09:35:56, Vlastimil Babka wrote: [...] > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index 570383a41853..0cb09714d960 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -256,8 +256,7 @@ struct vm_area_struct; > #define GFP_HIGHUSER (GFP_USER |

[RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-10 Thread Vlastimil Babka
After the previous patch, we can distinguish costly allocations that should be really lightweight, such as THP page faults, with __GFP_NORETRY. This means we don't need to recognize khugepaged allocations via PF_KTHREAD anymore. We can also change THP page faults in areas where

[RFC 06/13] mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations

2016-05-10 Thread Vlastimil Babka
After the previous patch, we can distinguish costly allocations that should be really lightweight, such as THP page faults, with __GFP_NORETRY. This means we don't need to recognize khugepaged allocations via PF_KTHREAD anymore. We can also change THP page faults in areas where