Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Paul E. McKenney
On Thu, Aug 27, 2015 at 08:14:35PM +0200, Michal Hocko wrote: > On Thu 27-08-15 09:36:34, Paul E. McKenney wrote: > > On Thu, Aug 27, 2015 at 05:09:17PM +0200, Michal Hocko wrote: > > > On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: > > > > On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Thu 27-08-15 09:36:34, Paul E. McKenney wrote: > On Thu, Aug 27, 2015 at 05:09:17PM +0200, Michal Hocko wrote: > > On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: > > > On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: > > [...] > > > > But if you do one day implement that,

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Thu 27-08-15 10:28:48, Hugh Dickins wrote: > On Thu, 27 Aug 2015, Michal Hocko wrote: > > On Thu 27-08-15 17:09:17, Michal Hocko wrote: > > [...] > > > Btw. Do we need the same think for page::mapping and KSM? > > > > I guess we are safe here because the address for mappings comes from > >

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Hugh Dickins
On Thu, 27 Aug 2015, Michal Hocko wrote: > On Thu 27-08-15 17:09:17, Michal Hocko wrote: > [...] > > Btw. Do we need the same think for page::mapping and KSM? > > I guess we are safe here because the address for mappings comes from > kmalloc and that aligned properly, right? Not quite right, in

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Paul E. McKenney
On Thu, Aug 27, 2015 at 05:09:17PM +0200, Michal Hocko wrote: > On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: > > On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: > [...] > > > But if you do one day implement that, wouldn't sl?b.c have to use > > > call_rcu_with_added_meaning()

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Thu 27-08-15 17:09:17, Michal Hocko wrote: [...] > Btw. Do we need the same think for page::mapping and KSM? I guess we are safe here because the address for mappings comes from kmalloc and that aligned properly, right? -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: > On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: [...] > > But if you do one day implement that, wouldn't sl?b.c have to use > > call_rcu_with_added_meaning() instead of call_rcu(), to be in danger > > of getting that bit set? (No

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Thu 27-08-15 09:36:34, Paul E. McKenney wrote: On Thu, Aug 27, 2015 at 05:09:17PM +0200, Michal Hocko wrote: On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: [...] But if you do one day implement that, wouldn't sl?b.c

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Paul E. McKenney
On Thu, Aug 27, 2015 at 05:09:17PM +0200, Michal Hocko wrote: On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: [...] But if you do one day implement that, wouldn't sl?b.c have to use call_rcu_with_added_meaning() instead of

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Thu 27-08-15 10:28:48, Hugh Dickins wrote: On Thu, 27 Aug 2015, Michal Hocko wrote: On Thu 27-08-15 17:09:17, Michal Hocko wrote: [...] Btw. Do we need the same think for page::mapping and KSM? I guess we are safe here because the address for mappings comes from kmalloc and that

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Hugh Dickins
On Thu, 27 Aug 2015, Michal Hocko wrote: On Thu 27-08-15 17:09:17, Michal Hocko wrote: [...] Btw. Do we need the same think for page::mapping and KSM? I guess we are safe here because the address for mappings comes from kmalloc and that aligned properly, right? Not quite right, in fact.

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Thu 27-08-15 17:09:17, Michal Hocko wrote: [...] Btw. Do we need the same think for page::mapping and KSM? I guess we are safe here because the address for mappings comes from kmalloc and that aligned properly, right? -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Michal Hocko
On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: [...] But if you do one day implement that, wouldn't sl?b.c have to use call_rcu_with_added_meaning() instead of call_rcu(), to be in danger of getting that bit set? (No rcu_head

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-27 Thread Paul E. McKenney
On Thu, Aug 27, 2015 at 08:14:35PM +0200, Michal Hocko wrote: On Thu 27-08-15 09:36:34, Paul E. McKenney wrote: On Thu, Aug 27, 2015 at 05:09:17PM +0200, Michal Hocko wrote: On Wed 26-08-15 14:29:16, Paul E. McKenney wrote: On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote:

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Paul E. McKenney
On Wed, Aug 26, 2015 at 03:28:39PM -0700, Hugh Dickins wrote: > On Wed, 26 Aug 2015, Paul E. McKenney wrote: > > On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: > > > On Tue, 25 Aug 2015, Paul E. McKenney wrote: > > > > On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote:

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Hugh Dickins
On Wed, 26 Aug 2015, Paul E. McKenney wrote: > On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: > > On Tue, 25 Aug 2015, Paul E. McKenney wrote: > > > On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: > > > > On 25.8.2015 22:11, Paul E. McKenney wrote: > > > > > On Tue,

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Paul E. McKenney
On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: > On Tue, 25 Aug 2015, Paul E. McKenney wrote: > > On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: > > > On 25.8.2015 22:11, Paul E. McKenney wrote: > > > > On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Hugh Dickins
On Tue, 25 Aug 2015, Paul E. McKenney wrote: > On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: > > On 25.8.2015 22:11, Paul E. McKenney wrote: > > > On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: > > >> On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Paul E. McKenney
On Wed, Aug 26, 2015 at 06:04:12PM +0300, Kirill A. Shutemov wrote: > On Tue, Aug 25, 2015 at 02:19:54PM -0700, Paul E. McKenney wrote: > > On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: > > > On 25.8.2015 22:11, Paul E. McKenney wrote: > > > > On Tue, Aug 25, 2015 at 09:33:54PM

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Vlastimil Babka
On 08/26/2015 05:04 PM, Kirill A. Shutemov wrote: That's bad news then. It's not that we would trigger that bit when the rcu_head part of the union is "active". It's that pfn scanners could inspect such page at arbitrary

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Kirill A. Shutemov
On Tue, Aug 25, 2015 at 02:19:54PM -0700, Paul E. McKenney wrote: > On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: > > On 25.8.2015 22:11, Paul E. McKenney wrote: > > > On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: > > >> On Tue, Aug 25, 2015 at 01:44:13PM

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Hugh Dickins
On Tue, 25 Aug 2015, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote:

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Paul E. McKenney
On Wed, Aug 26, 2015 at 06:04:12PM +0300, Kirill A. Shutemov wrote: On Tue, Aug 25, 2015 at 02:19:54PM -0700, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 09:33:54PM +0300,

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Hugh Dickins
On Wed, 26 Aug 2015, Paul E. McKenney wrote: On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: On Tue, 25 Aug 2015, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Paul E. McKenney
On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: On Tue, 25 Aug 2015, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote:

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Kirill A. Shutemov
On Tue, Aug 25, 2015 at 02:19:54PM -0700, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: On Tue, Aug 25, 2015 at 01:44:13PM +0200,

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Paul E. McKenney
On Wed, Aug 26, 2015 at 03:28:39PM -0700, Hugh Dickins wrote: On Wed, 26 Aug 2015, Paul E. McKenney wrote: On Wed, Aug 26, 2015 at 11:18:45AM -0700, Hugh Dickins wrote: On Tue, 25 Aug 2015, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-26 Thread Vlastimil Babka
On 08/26/2015 05:04 PM, Kirill A. Shutemov wrote: That's bad news then. It's not that we would trigger that bit when the rcu_head part of the union is active. It's that pfn scanners could inspect such page at arbitrary

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Paul E. McKenney
On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: > On 25.8.2015 22:11, Paul E. McKenney wrote: > > On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: > >> On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: > >>> On 08/21/2015 02:10 PM, Kirill A.

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Vlastimil Babka
On 25.8.2015 22:11, Paul E. McKenney wrote: > On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: >> On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: >>> On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Paul E. McKenney
On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: > On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: > > On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: > > >On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: > > >>On Wed, 19 Aug 2015 12:21:45 +0300

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Kirill A. Shutemov
On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: > On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: > >On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: > >>On Wed, 19 Aug 2015 12:21:45 +0300 "Kirill A. Shutemov" > >> wrote: > >> > >>>The patch introduces

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Vlastimil Babka
On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: On Wed, 19 Aug 2015 12:21:45 +0300 "Kirill A. Shutemov" wrote: The patch introduces page->compound_head into third double word block in front of compound_dtor and compound_order.

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Kirill A. Shutemov
On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: The patch

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Paul E. McKenney
On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A.

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Vlastimil Babka
On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: The patch introduces page-compound_head into third double word block in front of

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Vlastimil Babka
On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote: On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: On

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-25 Thread Paul E. McKenney
On Tue, Aug 25, 2015 at 10:46:44PM +0200, Vlastimil Babka wrote: On 25.8.2015 22:11, Paul E. McKenney wrote: On Tue, Aug 25, 2015 at 09:33:54PM +0300, Kirill A. Shutemov wrote: On Tue, Aug 25, 2015 at 01:44:13PM +0200, Vlastimil Babka wrote: On 08/21/2015 02:10 PM, Kirill A. Shutemov wrote:

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-24 Thread Vlastimil Babka
On 08/21/2015 09:34 PM, Andrew Morton wrote: On Fri, 21 Aug 2015 22:31:09 +0300 "Kirill A. Shutemov" wrote: On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: Is this really true? For example if it's a slab page, will that

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-24 Thread Kirill A. Shutemov
On Wed, Aug 19, 2015 at 12:21:45PM +0300, Kirill A. Shutemov wrote: > Hugh has pointed that compound_head() call can be unsafe in some > context. There's one example: > > CPU0CPU1 > > isolate_migratepages_block() > page_count() > compound_head() >

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-24 Thread Kirill A. Shutemov
On Mon, Aug 24, 2015 at 01:59:45AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 19 Aug 2015 12:21:45 +0300 > "Kirill A. Shutemov" wrote: > > > Hugh has pointed that compound_head() call can be unsafe in some > > context. There's one example: > > > [...] > > > diff --git a/include/linux/mm.h

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-24 Thread Vlastimil Babka
On 08/21/2015 09:34 PM, Andrew Morton wrote: On Fri, 21 Aug 2015 22:31:09 +0300 Kirill A. Shutemov kir...@shutemov.name wrote: On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: Is this really true? For example if it's a slab

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-24 Thread Kirill A. Shutemov
On Wed, Aug 19, 2015 at 12:21:45PM +0300, Kirill A. Shutemov wrote: Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: CPU0CPU1 isolate_migratepages_block() page_count() compound_head()

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-24 Thread Kirill A. Shutemov
On Mon, Aug 24, 2015 at 01:59:45AM +0200, Jesper Dangaard Brouer wrote: On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: [...] diff --git

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-23 Thread Jesper Dangaard Brouer
On Wed, 19 Aug 2015 12:21:45 +0300 "Kirill A. Shutemov" wrote: > Hugh has pointed that compound_head() call can be unsafe in some > context. There's one example: > [...] > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 0735bc0a351a..a4c4b7d07473 100644 > --- a/include/linux/mm.h

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-23 Thread Jesper Dangaard Brouer
On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: [...] diff --git a/include/linux/mm.h b/include/linux/mm.h index 0735bc0a351a..a4c4b7d07473 100644

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Christoph Lameter
On Fri, 21 Aug 2015, Andrew Morton wrote: > On Fri, 21 Aug 2015 22:31:09 +0300 "Kirill A. Shutemov" > wrote: > > > On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: > > > On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: > > > > > > > > Is this really true? For example if it's a

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Andrew Morton
On Fri, 21 Aug 2015 22:31:09 +0300 "Kirill A. Shutemov" wrote: > On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: > > On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: > > > > > > Is this really true? For example if it's a slab page, will that page > > > > ever be inspected by

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Kirill A. Shutemov
On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: > On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: > > > > Is this really true? For example if it's a slab page, will that page > > > ever be inspected by code which is looking for the PageTail bit? > > > > +Christoph. > > > > What

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Christoph Lameter
On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: > > Is this really true? For example if it's a slab page, will that page > > ever be inspected by code which is looking for the PageTail bit? > > +Christoph. > > What we know for sure is that space is not used in tail pages, otherwise > it would

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Kirill A. Shutemov
On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: > On Wed, 19 Aug 2015 12:21:45 +0300 "Kirill A. Shutemov" > wrote: > > > Hugh has pointed that compound_head() call can be unsafe in some > > context. There's one example: > > > > CPU0CPU1 >

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Kirill A. Shutemov
On Thu, Aug 20, 2015 at 04:36:43PM -0700, Andrew Morton wrote: On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: CPU0

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Christoph Lameter
On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: Is this really true? For example if it's a slab page, will that page ever be inspected by code which is looking for the PageTail bit? +Christoph. What we know for sure is that space is not used in tail pages, otherwise it would collide with

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Kirill A. Shutemov
On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: Is this really true? For example if it's a slab page, will that page ever be inspected by code which is looking for the PageTail bit? +Christoph. What we know for

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Christoph Lameter
On Fri, 21 Aug 2015, Andrew Morton wrote: On Fri, 21 Aug 2015 22:31:09 +0300 Kirill A. Shutemov kir...@shutemov.name wrote: On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: Is this really true? For example if it's

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-21 Thread Andrew Morton
On Fri, 21 Aug 2015 22:31:09 +0300 Kirill A. Shutemov kir...@shutemov.name wrote: On Fri, Aug 21, 2015 at 11:11:27AM -0500, Christoph Lameter wrote: On Fri, 21 Aug 2015, Kirill A. Shutemov wrote: Is this really true? For example if it's a slab page, will that page ever be

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-20 Thread Andrew Morton
On Wed, 19 Aug 2015 12:21:45 +0300 "Kirill A. Shutemov" wrote: > Hugh has pointed that compound_head() call can be unsafe in some > context. There's one example: > > CPU0CPU1 > > isolate_migratepages_block() > page_count() > compound_head() >

Re: [PATCHv3 4/5] mm: make compound_head() robust

2015-08-20 Thread Andrew Morton
On Wed, 19 Aug 2015 12:21:45 +0300 Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: CPU0CPU1 isolate_migratepages_block() page_count()

[PATCHv3 4/5] mm: make compound_head() robust

2015-08-19 Thread Kirill A. Shutemov
Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: CPU0CPU1 isolate_migratepages_block() page_count() compound_head() !!PageTail() == true put_page()

[PATCHv3 4/5] mm: make compound_head() robust

2015-08-19 Thread Kirill A. Shutemov
Hugh has pointed that compound_head() call can be unsafe in some context. There's one example: CPU0CPU1 isolate_migratepages_block() page_count() compound_head() !!PageTail() == true put_page()