From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751058AbcFRFIy (ORCPT ); Sat, 18 Jun 2016 01:08:54 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:63076 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbcFRFIx (ORCPT ); Sat, 18 Jun 2016 01:08:53 -0400 Message-ID: <5764D72B.2080800@huawei.com> Date: Sat, 18 Jun 2016 13:07:55 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Mike Kravetz CC: "Kirill A. Shutemov" , Michal Hocko , , , Subject: Re: [PATCH] mm: fix account pmd page to the process References: <1466076971-24609-1-git-send-email-zhongjiang@huawei.com> <20160616154214.GA12284@dhcp22.suse.cz> <20160616154324.GN6836@dhcp22.suse.cz> <71df66ac-df29-9542-bfa9-7c94f374df5b@oracle.com> <20160616163119.GP6836@dhcp22.suse.cz> <20160617122506.GC6534@node.shutemov.name> <8141c2df-5643-4ba9-42a5-5b536517cdee@oracle.com> In-Reply-To: <8141c2df-5643-4ba9-42a5-5b536517cdee@oracle.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.5764D736.00A7,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8350be02768a4555f384b42b187d94de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/6/17 23:39, Mike Kravetz wrote: > On 06/17/2016 05:25 AM, Kirill A. Shutemov wrote: >> From fd22922e7b4664e83653a84331f0a95b985bff0c Mon Sep 17 00:00:00 2001 >> From: "Kirill A. Shutemov" >> Date: Fri, 17 Jun 2016 15:07:03 +0300 >> Subject: [PATCH] hugetlb: fix nr_pmds accounting with shared page tables >> >> We account HugeTLB's shared page table to all processes who share it. >> The accounting happens during huge_pmd_share(). >> >> If somebody populates pud entry under us, we should decrease pagetable's >> refcount and decrease nr_pmds of the process. >> >> By mistake, I increase nr_pmds again in this case. :-/ >> It will lead to "BUG: non-zero nr_pmds on freeing mm: 2" on process' >> exit. >> >> Let's fix this by increasing nr_pmds only when we're sure that the page >> table will be used. >> >> Signed-off-by: Kirill A. Shutemov > Nice, > Reviewed-by: Mike Kravetz > > I agree that we do not necessarily need a back port. I have not seen > reports of people experiencing this race and seeing the BUG (on mm > tear-down). > > zhongjiang, did someone actually hit the BUG? Or, did you find it by > code examination? > just code examination.