From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877AbaJERP5 (ORCPT ); Sun, 5 Oct 2014 13:15:57 -0400 Received: from mail-vc0-f179.google.com ([209.85.220.179]:35177 "EHLO mail-vc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625AbaJERPz (ORCPT ); Sun, 5 Oct 2014 13:15:55 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 5 Oct 2014 10:15:53 -0700 X-Google-Sender-Auth: kmVHEHeZoLufiU28oy3zZ5I1Crk Message-ID: Subject: Re: [patch for-3.17] mm, thp: fix collapsing of hugepages on madvise From: Linus Torvalds To: David Rientjes Cc: Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , Suleiman Souhlal , stable , Linux Kernel Mailing List , linux-mm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 4, 2014 at 7:48 PM, David Rientjes wrote: > > This occurs because the madvise(2) handler for thp, hugepage_advise(), > clears VM_NOHUGEPAGE on the stack and it isn't stored in vma->vm_flags > until the final action of madvise_behavior(). This causes the > khugepaged_enter_vma_merge() to be a no-op in hugepage_advise() when the > vma had previously had VM_NOHUGEPAGE set. So color me confused, and when I'm confused I don't apply patches. But there's no "hugepage_advise()" in my source tree, and quite frankly, I also don't like how you now separately pass in vm_flags that always *should* be the same as vma->vm_flags. Maybe this is against -mm, but it's marked for stable and sent to me, so I'm piping up about my lack of applying this. Linus