Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3675747pxt; Tue, 10 Aug 2021 08:50:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1BhbHBo/iztKqkCURI8ydLUlEp7NU/nYiyMhB0ekRSmZWJqsFQuuCvE56mN/6kA9tB67v X-Received: by 2002:a17:906:85d0:: with SMTP id i16mr13482741ejy.552.1628610639845; Tue, 10 Aug 2021 08:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628610639; cv=none; d=google.com; s=arc-20160816; b=DtUgm71hvCs4v58KdUexUG4C0Fc7leqeCO910k5sb8bd3CY61ngKrv1+05TgAE2ZZo 6T9Kj8V6VhVw/WAvA+phtZ1lzLoW6Jc9sRI58LoSNEJOCTdWouyJFlepnGfjRmHv3xEj JogA92VAjYSi1KdKxBw/Tm+xJtP4lqMuvCCIBk4lnXYiFmPWRO6XzycJqa9RiOzThG/y xahahbZKP3d0Ue8IVc91J0ROYqqE0R0MUO6dhOQ3QhT9Kf2Q+znaoBYnanFp97qI04/L CZxllpG9erx/1uSllSSwsnMux9yKDLOngY1WWApN/269irPp39FhQSuUOt1IlJtCfUrQ IXEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature:dkim-signature; bh=DwWkqfGxBvOom/EUoDetOXPBY1+wkqS9nBtbruSLbt4=; b=QyXpI2OgabgP0AhjjKp7XGgi6lN2FKsXm73badDLTNmtO6dmxDekoowiRHdt+yBzfp gyYc15DIm0qCRaLNUTnxep+6tE7vwm1zkOonA08O03kQYHypMHNLhnGayCQ7h0YX+FwU 983H/DApye+73jLR1GGZRLEZ+j9cg3GWrRBr4avI2TiuGt3ImEUWfvObKJKRCaN+eyAJ UlNtcH3s4Sdh9bCFebuiNC1EaYq05fQ6wF3xZY4sQl3Kc9ewZbhuaJsuLESLJoWCe+54 8GpvZ8XkcaILhxr7Zra7rubqeHLV6w//PuGtGqo19V1b4Q5f9NlFBfH+qyusE0/HvX1u yqag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TYkFJqHB; dkim=neutral (no key) header.i=@suse.de header.b=YgPssJJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si21849686edd.252.2021.08.10.08.50.15; Tue, 10 Aug 2021 08:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TYkFJqHB; dkim=neutral (no key) header.i=@suse.de header.b=YgPssJJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239053AbhHJJ3h (ORCPT + 99 others); Tue, 10 Aug 2021 05:29:37 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:46662 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239040AbhHJJ3e (ORCPT ); Tue, 10 Aug 2021 05:29:34 -0400 Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 818EF2200C; Tue, 10 Aug 2021 09:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1628587751; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DwWkqfGxBvOom/EUoDetOXPBY1+wkqS9nBtbruSLbt4=; b=TYkFJqHBrOfHe53WnsCxFqbJQE6pyPpwQsQSI1LmBjRLos7jjopwmlffYUCZmzfasFj2Z2 125iAHWwdKXsRc098b/Vz1dyuusO9MWyqHPsZ/A8mZl7vEdAPaR7Lr/ucfGa+N/n5v25w3 NYpg9OL8fowQCe1EG1OOV8zK/bXNSk8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1628587751; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DwWkqfGxBvOom/EUoDetOXPBY1+wkqS9nBtbruSLbt4=; b=YgPssJJiJoy/SuvrGM9aQ8IpGhhd7He5kyZX1zF6ZkYDFGYHUuX25pVRTrHZ5DUr04WDqJ ZRRBQPUsgeqterAg== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 7072D13651; Tue, 10 Aug 2021 09:29:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id eUcyG+dGEmEAaAAAGKfGzw (envelope-from ); Tue, 10 Aug 2021 09:29:11 +0000 MIME-Version: 1.0 Date: Tue, 10 Aug 2021 11:29:11 +0200 From: Oscar Salvador To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song , Michal Hocko , David Hildenbrand , Matthew Wilcox , Naoya Horiguchi , Mina Almasry , Andrew Morton Subject: Re: [PATCH v2 1/3] hugetlb: simplify prep_compound_gigantic_page ref count racing code In-Reply-To: <20210809184832.18342-2-mike.kravetz@oracle.com> References: <20210809184832.18342-1-mike.kravetz@oracle.com> <20210809184832.18342-2-mike.kravetz@oracle.com> User-Agent: Roundcube Webmail Message-ID: <19f47b787269b95bb76d81bb1e6bfcc3@suse.de> X-Sender: osalvador@suse.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-09 20:48, Mike Kravetz wrote: > Code in prep_compound_gigantic_page waits for a rcu grace period if it > notices a temporarily inflated ref count on a tail page. This was due > to the identified potential race with speculative page cache references > which could only last for a rcu grace period. This is overly > complicated > as this situation is VERY unlikely to ever happen. Instead, just > quickly > return an error. > Also, only print a warning in prep_compound_gigantic_page instead of > multiple callers. The above makes sense to me. My only question would be: gather_bootmem_prealloc() is an __init function. Can we have speculative refcounts due to e.g: pagecache at that early stage? I think we cannot, but I am not really sure. We might be able to remove that else() in case we cannot have such scenarios. -- Oscar Salvador SUSE L3