Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp76116rdb; Wed, 18 Oct 2023 19:16:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGx8r3I6ATPITMyXJV67muRpYYeGn65P8yFjA6jhkgYlMohOLj/zHPr/CcYcMmbLG/9IrDT X-Received: by 2002:a05:6a00:a0d:b0:6be:62e:d5a8 with SMTP id p13-20020a056a000a0d00b006be062ed5a8mr977996pfh.0.1697681789802; Wed, 18 Oct 2023 19:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697681789; cv=none; d=google.com; s=arc-20160816; b=hAq3Z15ypaqRrZZWUdXRKvRO97EgrCzfh7cBInb1zig5l/dKTXhWL6rohlt4aycg+2 SN5cvV4g8kC3dZLEXts1icSpYtN3i7HcbmWdHesvJ61Bmg3MFJo9TgTH0lWpu4D02KRB U49h0FF+keDPvt0+6kxguGCid+Z4jvaaSxdvijwy8Xdl2yaIqrcUVpzd2WuURMOJVegj CNV5y2I4mNvftUbkb5IgUK46oYRt0lp9V1WRL16ZRca1Tw1lKSvajMRRemeN33UCxrkO mSxH227d6Saf0eeiZSGSeqDpXx24l01WdXXHTkvPDgPjn2obsKFOEC0wgr5fugbt7kFZ rqUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=niLjjAUj5a4EXQp0TXTLkkgUyeeKsYWhUxQ9/gmkyLQ=; fh=+6gj9pih7khTC8RLs4Qz94mbx/VXLoxXD71bbo3Vr5Q=; b=kUCMCg9qHOL4lWVajOD+ej70v47wSXIMgu8Qw25Mla3TstdekXMp0ZxgxNJDoBoRj2 DE/+x3MTYVETNSzXdTeIbhivrFedvJ6AfFq4YvjUnyZNnEU9UVkoO+sdyeZtC6FL0Zvz f7Vfk1anx0UfOv0g91rg1Jz3lWaVBBmuKWc+9MiLkH81M8GbujEdyip4CLHmQpFbu4hw j+w80/UlaLGFS/bHCPqeUakc/HJMdSbfU1HUILVJjpVQ09ZN6rdGKgagOjgMmyJDPTbU otgDIuOn43IKAdvqpnvpP5V9RVa0E1txPG+96YlgU0MGc0K14mSf5yZbgPvuWn3f12sE hb0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YrmEM+7P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id d18-20020a656212000000b005add209e106si1765410pgv.442.2023.10.18.19.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 19:16:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YrmEM+7P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 970488259CD7; Wed, 18 Oct 2023 19:16:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232164AbjJSCPl (ORCPT + 99 others); Wed, 18 Oct 2023 22:15:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231950AbjJSCPk (ORCPT ); Wed, 18 Oct 2023 22:15:40 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7AA1114 for ; Wed, 18 Oct 2023 19:15:38 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1bdf4752c3cso48875695ad.2 for ; Wed, 18 Oct 2023 19:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1697681738; x=1698286538; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=niLjjAUj5a4EXQp0TXTLkkgUyeeKsYWhUxQ9/gmkyLQ=; b=YrmEM+7P8bLZYXWTEqZI87YGvWFOt17nEtPWGaJNohzxGoN+eUKPi7z6LjORDetqsX fPmEvmzXAyGmcGbKWTFOWFImGg3o+nF3Nn1ZU5CI1X2UBRFpcurvCnZg3jE0/f2DrtCg aiPBBF2op2Ro375zAlobEcwQk9p/lb7T0ch7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697681738; x=1698286538; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=niLjjAUj5a4EXQp0TXTLkkgUyeeKsYWhUxQ9/gmkyLQ=; b=EfdDqE1GD/mtguIN0YXELlzNQ2Fmac5ffTRHh6IEorxP9NoyHZY0wo1Z0soobxtZMR EMLpZKC7Eal6QOUg6EzXltjdSAG5gVrohG4TXRzZPOKupEhE02LkCv9MpEHYZcPJ+IAu mRRFJUzvFOlVIdsQWSyYBj4Q0GycNoJrfr9yN/HcgzwhFmcFwJ4oprEccxNZky78WJz6 tNbPVV/A2g+diC8esix3yLH+NhpA7vIwgUxqurC7TXyPB6kyQnEX9g7VHpZE9+rYw7S1 3VBYvDln3TdQWnBG+DTNRJf+YtnhOIPI+XJYd9Uyh+JUzs3jrQdfOlKHwebjzIgC09EZ Lcog== X-Gm-Message-State: AOJu0Yy47n9ZRQIUssDsNHVOT/ymBEW1f+NFLXrSBwymAgj5+QiFlusC ASQmxWa0QPP4EJaV9ECjDeR3yQ== X-Received: by 2002:a17:902:f685:b0:1c8:791c:d797 with SMTP id l5-20020a170902f68500b001c8791cd797mr1168062plg.56.1697681738067; Wed, 18 Oct 2023 19:15:38 -0700 (PDT) Received: from google.com (KD124209175111.ppp-bb.dion.ne.jp. [124.209.175.111]) by smtp.gmail.com with ESMTPSA id jh1-20020a170903328100b001c9ab91d3d7sm624470plb.37.2023.10.18.19.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 19:15:37 -0700 (PDT) Date: Thu, 19 Oct 2023 11:15:32 +0900 From: Sergey Senozhatsky To: Mike Kravetz Cc: Sergey Senozhatsky , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song , Joao Martins , Konrad Dybcio , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song <21cnbao@gmail.com>, Michal Hocko , Matthew Wilcox , Xiongchun Duan , Andrew Morton Subject: Re: Bisected: [PATCH v7 2/8] hugetlb: restructure pool allocations Message-ID: <20231019021532.GA14965@google.com> References: <20231006032012.296473-1-mike.kravetz@oracle.com> <20231006032012.296473-3-mike.kravetz@oracle.com> <20231011064756.GB2866435@google.com> <20231018224422.GC5181@monkey> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018224422.GC5181@monkey> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 19:16:25 -0700 (PDT) On (23/10/18 15:44), Mike Kravetz wrote: > Hi Sergey, > > Sorry for the delay. Not ignoring your report but chasing this in > another thread. Hi Mike, no worries. > https://lore.kernel.org/linux-mm/20231018222003.GA21776@monkey/ Oh, interesting. I just read the article the other day about some of unexpected optimizations that clang can do [1]. Setting h to NULL seems to be fixing the problem for me. > Quick question. > Are you using LLVM/clang in your builds? Yes, clang 14.0.6 The kernel compiled with gcc does not BUG_ON(). > My guess is that you are hitting the same issue. That BUG at mm/hugetlb.c:3180 > should not be checked/executed unless you allocate gigantic hugetlb pages on > the kernel command line. Suspect you are not doing this, and loop code is > being run when it should not. Looks very similar indeed. [1] https://research.swtch.com/ub