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=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 8C82CC2B9F4 for ; Thu, 17 Jun 2021 16:10:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7449B6141F for ; Thu, 17 Jun 2021 16:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233925AbhFQQMc (ORCPT ); Thu, 17 Jun 2021 12:12:32 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34808 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbhFQQLZ (ORCPT ); Thu, 17 Jun 2021 12:11:25 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0EE5B21AFA; Thu, 17 Jun 2021 16:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623946157; 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=mYFUJ1KwmJZvOYZxN949HWoq7I5ZyPXAkOTS38THsaM=; b=O8wStvwXRtGhEu9rSOmINCc3gKa0fX430+NkQuQbOkuOgzvTCBI6CWHLMeYxU/sKc1Rufn p6tTCRejpso6dv1Hfc6qnAeGQkhkX9ZitSFrBPGrq+6hczMTuCinMh5MsKfgAkstLgDWRO mUT/c2rknm8jSoq5ZXEzyH0t3cHh1qE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623946157; 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=mYFUJ1KwmJZvOYZxN949HWoq7I5ZyPXAkOTS38THsaM=; b=F18qGxTSGuiUOE7eUJOB6D0LpdALEtYrW6yjb5glRm3YeteuexOkZKf3OJtDpy0R+AG+rK IPwqsc/iagiCCxAQ== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id E5347118DD; Thu, 17 Jun 2021 16:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623946157; 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=mYFUJ1KwmJZvOYZxN949HWoq7I5ZyPXAkOTS38THsaM=; b=O8wStvwXRtGhEu9rSOmINCc3gKa0fX430+NkQuQbOkuOgzvTCBI6CWHLMeYxU/sKc1Rufn p6tTCRejpso6dv1Hfc6qnAeGQkhkX9ZitSFrBPGrq+6hczMTuCinMh5MsKfgAkstLgDWRO mUT/c2rknm8jSoq5ZXEzyH0t3cHh1qE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623946157; 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=mYFUJ1KwmJZvOYZxN949HWoq7I5ZyPXAkOTS38THsaM=; b=F18qGxTSGuiUOE7eUJOB6D0LpdALEtYrW6yjb5glRm3YeteuexOkZKf3OJtDpy0R+AG+rK IPwqsc/iagiCCxAQ== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id Y7R2N6xzy2B9HQAALh3uQQ (envelope-from ); Thu, 17 Jun 2021 16:09:16 +0000 Subject: Re: [PATCH v2] mm/gup: fix try_grab_compound_head() race with split_huge_page() To: Yang Shi Cc: Jann Horn , John Hubbard , Matthew Wilcox , Andrew Morton , Linux-MM , kernel list , "Kirill A . Shutemov" , Jan Kara , stable References: <20210615012014.1100672-1-jannh@google.com> <50d828d1-2ce6-21b4-0e27-fb15daa77561@nvidia.com> <6d21f8cb-4b72-bdec-386c-684ddbcdada1@suse.cz> From: Vlastimil Babka Message-ID: <2847e923-2366-6a3b-3d76-4513a01981a0@suse.cz> Date: Thu, 17 Jun 2021 18:09:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 8:40 PM, Yang Shi wrote: > On Wed, Jun 16, 2021 at 10:27 AM Vlastimil Babka wrote: >> >> On 6/16/21 1:10 AM, Yang Shi wrote: >> > On Tue, Jun 15, 2021 at 5:10 AM Jann Horn wrote: >> >> >> > >> > It might be possible after Mel's "mm/page_alloc: Allow high-order >> > pages to be stored on the per-cpu lists" patch >> > (https://patchwork.kernel.org/project/linux-mm/patch/20210611135753.GC30378@techsingularity.net/). >> >> Those would be percpu indeed, but not "lockless, non-atomic", no? They are >> protected by a local_lock. > > The local_lock is *not* a lock on non-PREEMPT_RT kernel IIUC. It > disables preempt and IRQ. But preempt disable is no-op on non-preempt > kernel. IRQ disable can guarantee it is atomic context, but I'm not > sure if it is equivalent to "atomic freelists" in Jann's context. Hm right, I thought all locks had the acquire/release semantics, but this one is just a barrier().