From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD043C34026 for ; Tue, 18 Feb 2020 19:14:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9F94822B48 for ; Tue, 18 Feb 2020 19:14:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="evNMlimV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F94822B48 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 330226B0003; Tue, 18 Feb 2020 14:14:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E0B76B0006; Tue, 18 Feb 2020 14:14:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F63E6B0007; Tue, 18 Feb 2020 14:14:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 0674F6B0003 for ; Tue, 18 Feb 2020 14:14:31 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B1BF08248D51 for ; Tue, 18 Feb 2020 19:14:30 +0000 (UTC) X-FDA: 76504199100.01.blade77_275660405b21a X-HE-Tag: blade77_275660405b21a X-Filterd-Recvd-Size: 5159 Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Tue, 18 Feb 2020 19:14:30 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01IJDwQt186783; Tue, 18 Feb 2020 19:14:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=klYs7sANTDBUGahPUju9sGWKYr/tKylftyYSkWKVd7M=; b=evNMlimVu3xmXlI/jjEVBPaZZEWMkPu5+xRAILOSZ2HHqMNX69dd4vUwzjS8x59DrKdd 5nxBXGA3OxMdQin9eVnqgx0UqW+1nEMf8x/kDSi86SYett7WmGvjQZ3xU2lv8WtntjVE tPrSIL2BuuBGNJmoTMORRAExFtSh/hQyPT9m1wMTtokQ4/aR5VKRxcCbDqmEOcRMPnXu D6rahYOQtdo0znPDwFlsWuDUii+txSF/XOSXmCiu9lHDxNqfPTnOMaN78+EcuVzTeHaS 2/rVylv79hPpyksaAUnl6ZKWAAQuolmrGuWMalYnfocc3uXd3cNr1f8QnOOGdNhGAkqN Sw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2y699rr9v1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Feb 2020 19:14:24 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01IJDkEC050650; Tue, 18 Feb 2020 19:14:24 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2y6tc2wunw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Feb 2020 19:14:24 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 01IJEM8r000976; Tue, 18 Feb 2020 19:14:23 GMT Received: from [192.168.1.206] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 18 Feb 2020 11:14:22 -0800 Subject: Re: [PATCH v12 1/9] hugetlb_cgroup: Add hugetlb_cgroup reservation counter To: Mina Almasry , Qian Cai Cc: Andrew Morton , shuah , David Rientjes , Shakeel Butt , Greg Thelen , open list , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org References: <20200211213128.73302-1-almasrymina@google.com> <20200211151906.637d1703e4756066583b89da@linux-foundation.org> <1582035660.7365.90.camel@lca.pw> From: Mike Kravetz Message-ID: Date: Tue, 18 Feb 2020 11:14:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9535 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 suspectscore=27 mlxscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=986 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002180129 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9535 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=27 malwarescore=0 priorityscore=1501 adultscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002180129 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/18/20 10:35 AM, Mina Almasry wrote: > On Tue, Feb 18, 2020 at 6:21 AM Qian Cai wrote: >> >> On Tue, 2020-02-11 at 15:19 -0800, Andrew Morton wrote: >>> On Tue, 11 Feb 2020 13:31:20 -0800 Mina Almasry wrote: >>> >> [ 7933.806377][T14355] ------------[ cut here ]------------ >> [ 7933.806541][T14355] kernel BUG at mm/hugetlb.c:490! >> VM_BUG_ON(t - f <= 1); >> [ 7933.806562][T14355] Oops: Exception in kernel mode, sig: 5 [#1] > Hi Qian, > > Yes this VM_BUG_ON was added by a patch in the series ("hugetlb: > disable region_add file_region coalescing") so it's definitely related > to the series. I'm taking a look at why this VM_BUG_ON fires. Can you > confirm you reproduce this by running hugemmap06 from the ltp on a > powerpc machine? Can I maybe have your config? > > Thanks! Hi Mina, Looking at the region_chg code again, we do a resv->adds_in_progress += *out_regions_needed; and then potentially drop the lock to allocate the needed entries. Could anopther thread (only adding reservation for a single page) then come in and notice that there are not enough entries in the cache and hit the VM_BUG_ON()? -- Mike Kravetz