From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752356AbbDAWvX (ORCPT ); Wed, 1 Apr 2015 18:51:23 -0400 Received: from TYO201.gate.nec.co.jp ([210.143.35.51]:42322 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751593AbbDAWvW convert rfc822-to-8bit (ORCPT ); Wed, 1 Apr 2015 18:51:22 -0400 From: Naoya Horiguchi To: Andrew Morton CC: Mel Gorman , Naoya Horiguchi , "linux-mm@kvack.org" , Hugh Dickins , "Kirill A. Shutemov" , David Rientjes , Rik van Riel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mm: numa: disable change protection for vma(VM_HUGETLB) Thread-Topic: [PATCH] mm: numa: disable change protection for vma(VM_HUGETLB) Thread-Index: AQHQa1RtvOznTUkTLkWQBP/X/X+ynJ02h6SAgABvgQA= Date: Wed, 1 Apr 2015 04:14:27 +0000 Message-ID: <20150401041426.GA16703@hori1.linux.bs1.fc.nec.co.jp> References: <1427708426-31610-1-git-send-email-n-horiguchi@ah.jp.nec.com> <20150330102802.GQ4701@suse.de> <55192885.5010608@gmail.com> <20150330115901.GR4701@suse.de> <20150331014554.GA8128@hori1.linux.bs1.fc.nec.co.jp> <20150331143521.652d655e396d961410179d4d@linux-foundation.org> In-Reply-To: <20150331143521.652d655e396d961410179d4d@linux-foundation.org> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.26] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <1248571FEC3F644894A7F2606ACC02AA@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 31, 2015 at 02:35:21PM -0700, Andrew Morton wrote: > On Tue, 31 Mar 2015 01:45:55 +0000 Naoya Horiguchi wrote: > > > Currently when a process accesses to hugetlb range protected with PROTNONE, > > unexpected COWs are triggered, which finally put hugetlb subsystem into > > broken/uncontrollable state, where for example h->resv_huge_pages is subtracted > > too much and wrapped around to a very large number, and free hugepage pool > > is no longer maintainable. > > > > This patch simply stops changing protection for vma(VM_HUGETLB) to fix the > > problem. And this also allows us to avoid useless overhead of minor faults. > > > > ... > > > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -2161,8 +2161,10 @@ void task_numa_work(struct callback_head *work) > > vma = mm->mmap; > > } > > for (; vma; vma = vma->vm_next) { > > - if (!vma_migratable(vma) || !vma_policy_mof(vma)) > > + if (!vma_migratable(vma) || !vma_policy_mof(vma) || > > + is_vm_hugetlb_page(vma)) { > > continue; > > + } > > > > /* > > * Shared library pages mapped by multiple processes are not > > Which kernel version(s) need this patch? I don't bisect completely, but the problem this patch is mentioning is visible since v4.0-rc1 (not reproduced at v3.19). Thanks, Naoya Horiguchi