Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-24 Thread David Rientjes
On Tue, 24 Jul 2018, Kirill A. Shutemov wrote: > > use_zero_page is currently a simple thp flag, meaning it rejects writes > > where val != !!val, so perhaps it would be best to overload it with > > additional options? I can imagine 0x2 defining persistent allocation so > > that the hzp is

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-24 Thread David Rientjes
On Tue, 24 Jul 2018, Kirill A. Shutemov wrote: > > use_zero_page is currently a simple thp flag, meaning it rejects writes > > where val != !!val, so perhaps it would be best to overload it with > > additional options? I can imagine 0x2 defining persistent allocation so > > that the hzp is

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-24 Thread Kirill A. Shutemov
On Mon, Jul 23, 2018 at 02:33:08PM -0700, David Rientjes wrote: > On Mon, 23 Jul 2018, David Rientjes wrote: > > > > > The huge zero page can be reclaimed under memory pressure and, if it > > > > is, > > > > it is attempted to be allocted again with gfp flags that attempt memory > > > >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-24 Thread Kirill A. Shutemov
On Mon, Jul 23, 2018 at 02:33:08PM -0700, David Rientjes wrote: > On Mon, 23 Jul 2018, David Rientjes wrote: > > > > > The huge zero page can be reclaimed under memory pressure and, if it > > > > is, > > > > it is attempted to be allocted again with gfp flags that attempt memory > > > >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Mon, 23 Jul 2018, Yang Shi wrote: > > > I agree to keep it for a while to let that security bug cool down, > > > however, if > > > there is no user anymore, it sounds pointless to still keep a dead knob. > > > > > It's not a dead knob. We use it, and for reasons other than > >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Mon, 23 Jul 2018, Yang Shi wrote: > > > I agree to keep it for a while to let that security bug cool down, > > > however, if > > > there is no user anymore, it sounds pointless to still keep a dead knob. > > > > > It's not a dead knob. We use it, and for reasons other than > >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread Yang Shi
On 7/23/18 1:31 PM, David Rientjes wrote: On Fri, 20 Jul 2018, Yang Shi wrote: I agree to keep it for a while to let that security bug cool down, however, if there is no user anymore, it sounds pointless to still keep a dead knob. It's not a dead knob. We use it, and for reasons other

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread Yang Shi
On 7/23/18 1:31 PM, David Rientjes wrote: On Fri, 20 Jul 2018, Yang Shi wrote: I agree to keep it for a while to let that security bug cool down, however, if there is no user anymore, it sounds pointless to still keep a dead knob. It's not a dead knob. We use it, and for reasons other

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread Yang Shi
On 7/23/18 2:33 PM, David Rientjes wrote: On Mon, 23 Jul 2018, David Rientjes wrote: The huge zero page can be reclaimed under memory pressure and, if it is, it is attempted to be allocted again with gfp flags that attempt memory compaction that can become expensive. If we are constantly

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread Yang Shi
On 7/23/18 2:33 PM, David Rientjes wrote: On Mon, 23 Jul 2018, David Rientjes wrote: The huge zero page can be reclaimed under memory pressure and, if it is, it is attempted to be allocted again with gfp flags that attempt memory compaction that can become expensive. If we are constantly

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Mon, 23 Jul 2018, David Rientjes wrote: > > > The huge zero page can be reclaimed under memory pressure and, if it is, > > > it is attempted to be allocted again with gfp flags that attempt memory > > > compaction that can become expensive. If we are constantly under memory > > > pressure,

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Mon, 23 Jul 2018, David Rientjes wrote: > > > The huge zero page can be reclaimed under memory pressure and, if it is, > > > it is attempted to be allocted again with gfp flags that attempt memory > > > compaction that can become expensive. If we are constantly under memory > > > pressure,

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Fri, 20 Jul 2018, Yang Shi wrote: > I agree to keep it for a while to let that security bug cool down, however, if > there is no user anymore, it sounds pointless to still keep a dead knob. > It's not a dead knob. We use it, and for reasons other than CVE-2017-1000405. To mitigate the

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Fri, 20 Jul 2018, Yang Shi wrote: > I agree to keep it for a while to let that security bug cool down, however, if > there is no user anymore, it sounds pointless to still keep a dead knob. > It's not a dead knob. We use it, and for reasons other than CVE-2017-1000405. To mitigate the

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Sat, 21 Jul 2018, Matthew Wilcox wrote: > > The huge zero page can be reclaimed under memory pressure and, if it is, > > it is attempted to be allocted again with gfp flags that attempt memory > > compaction that can become expensive. If we are constantly under memory > > pressure, it gets

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-23 Thread David Rientjes
On Sat, 21 Jul 2018, Matthew Wilcox wrote: > > The huge zero page can be reclaimed under memory pressure and, if it is, > > it is attempted to be allocted again with gfp flags that attempt memory > > compaction that can become expensive. If we are constantly under memory > > pressure, it gets

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-21 Thread Matthew Wilcox
On Fri, Jul 20, 2018 at 02:05:52PM -0700, David Rientjes wrote: > The huge zero page can be reclaimed under memory pressure and, if it is, > it is attempted to be allocted again with gfp flags that attempt memory > compaction that can become expensive. If we are constantly under memory >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-21 Thread Matthew Wilcox
On Fri, Jul 20, 2018 at 02:05:52PM -0700, David Rientjes wrote: > The huge zero page can be reclaimed under memory pressure and, if it is, > it is attempted to be allocted again with gfp flags that attempt memory > compaction that can become expensive. If we are constantly under memory >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Yang Shi
On 7/20/18 2:06 PM, Kirill A. Shutemov wrote: On Sat, Jul 21, 2018 at 02:13:50AM +0800, Yang Shi wrote: By digging into the original review, it looks use_zero_page sysfs knob was added to help ease-of-testing and give user a way to mitigate refcounting overhead. It has been a few years

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Yang Shi
On 7/20/18 2:06 PM, Kirill A. Shutemov wrote: On Sat, Jul 21, 2018 at 02:13:50AM +0800, Yang Shi wrote: By digging into the original review, it looks use_zero_page sysfs knob was added to help ease-of-testing and give user a way to mitigate refcounting overhead. It has been a few years

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Yang Shi
On 7/20/18 2:05 PM, David Rientjes wrote: On Fri, 20 Jul 2018, Yang Shi wrote: We disable the huge zero page through this interface, there were issues related to the huge zero page shrinker (probably best to never free a per-node huge zero page after allocated) and CVE-2017-1000405 for huge

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Yang Shi
On 7/20/18 2:05 PM, David Rientjes wrote: On Fri, 20 Jul 2018, Yang Shi wrote: We disable the huge zero page through this interface, there were issues related to the huge zero page shrinker (probably best to never free a per-node huge zero page after allocated) and CVE-2017-1000405 for huge

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Kirill A. Shutemov
On Sat, Jul 21, 2018 at 02:13:50AM +0800, Yang Shi wrote: > By digging into the original review, it looks use_zero_page sysfs knob > was added to help ease-of-testing and give user a way to mitigate > refcounting overhead. > > It has been a few years since the knob was added at the first place, I

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Kirill A. Shutemov
On Sat, Jul 21, 2018 at 02:13:50AM +0800, Yang Shi wrote: > By digging into the original review, it looks use_zero_page sysfs knob > was added to help ease-of-testing and give user a way to mitigate > refcounting overhead. > > It has been a few years since the knob was added at the first place, I

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread David Rientjes
On Fri, 20 Jul 2018, Yang Shi wrote: > > We disable the huge zero page through this interface, there were issues > > related to the huge zero page shrinker (probably best to never free a > > per-node huge zero page after allocated) and CVE-2017-1000405 for huge > > dirty COW. > > Thanks for the

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread David Rientjes
On Fri, 20 Jul 2018, Yang Shi wrote: > > We disable the huge zero page through this interface, there were issues > > related to the huge zero page shrinker (probably best to never free a > > per-node huge zero page after allocated) and CVE-2017-1000405 for huge > > dirty COW. > > Thanks for the

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Yang Shi
On 7/20/18 1:02 PM, David Rientjes wrote: On Fri, 20 Jul 2018, Andrew Morton wrote: By digging into the original review, it looks use_zero_page sysfs knob was added to help ease-of-testing and give user a way to mitigate refcounting overhead. It has been a few years since the knob was

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Yang Shi
On 7/20/18 1:02 PM, David Rientjes wrote: On Fri, 20 Jul 2018, Andrew Morton wrote: By digging into the original review, it looks use_zero_page sysfs knob was added to help ease-of-testing and give user a way to mitigate refcounting overhead. It has been a few years since the knob was

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread David Rientjes
On Fri, 20 Jul 2018, Andrew Morton wrote: > > By digging into the original review, it looks use_zero_page sysfs knob > > was added to help ease-of-testing and give user a way to mitigate > > refcounting overhead. > > > > It has been a few years since the knob was added at the first place, I > >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread David Rientjes
On Fri, 20 Jul 2018, Andrew Morton wrote: > > By digging into the original review, it looks use_zero_page sysfs knob > > was added to help ease-of-testing and give user a way to mitigate > > refcounting overhead. > > > > It has been a few years since the knob was added at the first place, I > >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Andrew Morton
On Sat, 21 Jul 2018 02:13:50 +0800 Yang Shi wrote: > By digging into the original review, it looks use_zero_page sysfs knob > was added to help ease-of-testing and give user a way to mitigate > refcounting overhead. > > It has been a few years since the knob was added at the first place, I >

Re: [PATCH] mm: thp: remove use_zero_page sysfs knob

2018-07-20 Thread Andrew Morton
On Sat, 21 Jul 2018 02:13:50 +0800 Yang Shi wrote: > By digging into the original review, it looks use_zero_page sysfs knob > was added to help ease-of-testing and give user a way to mitigate > refcounting overhead. > > It has been a few years since the knob was added at the first place, I >