Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp601673pxj; Thu, 17 Jun 2021 09:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzi0kYUJJZBqlVyyKsX1G+LQXnFlZCTdeg2YC7thTWyS7H5I/LpazxqTkD7ZKJxlz0vN55 X-Received: by 2002:a05:6e02:1d82:: with SMTP id h2mr4332501ila.180.1623947483882; Thu, 17 Jun 2021 09:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623947483; cv=none; d=google.com; s=arc-20160816; b=TcCFNeK6feZEOuWHNLOcjTADAt4RVWKJXjsQKBWzvNlr2zRizgPaRKAt2eTdnNwdbq xGuzv1qzT235v7cjpvPHQUyNpaWhqd9t8EfimcIi4AmP8TG5ZM8dnlvxXtF6fK05YkLZ iYK4XvBUHpxi7tk0qpzevyf+3QDQEcpy3jlWU0k4DapSk0D/siS9nakEvurYmtgaHVuL lgtJE2QdFP+V/CrfG/V68Dd8uLZc1+jkIMDLCJK3dROvg28p0Be5tHFUMhC/bkJR1Y5W am8A5lO9kBKoI1/4Rf5rN7gYOkj7JPZOgWQpxhmCMiCcCnBtUbdX+Pf+592PSQLd4vfY pEdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=mYFUJ1KwmJZvOYZxN949HWoq7I5ZyPXAkOTS38THsaM=; b=E3IBisnq7rIlSmibV1FIzDxY8aCBli6fNkujU9DUb/UddCgZkn2Y4NcIeE5QxmFMDK Lcj6qTtnkzabazgNuQ8FIiTXNo4PedOfsPAEfYffS0y81poJP8ZdovK4SHRrq8LBNiEt SWa2WgLDm7Yquu0098/LRkyi7u4pRb94Zu+Sgw35LJTW9lb8/mHK/bm6+VClhTy7iCj1 9I+0WbCnNFmJtc43SLQSgGdFh+ZLz5o3dJPbCUpi9eXqf+UQk8+IvunWASWCSQbapySm g3wnvH90Twh7DGifZM72nScdZQn1tvsFOOrR6Jct4UL2cbRelnxiJe/c9bif9CcCMj6e Q3GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=O8wStvwX; dkim=neutral (no key) header.i=@suse.cz header.b=F18qGxTS; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=O8wStvwX; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si2974872ilu.29.2021.06.17.09.31.10; Thu, 17 Jun 2021 09:31:23 -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.cz header.s=susede2_rsa header.b=O8wStvwX; dkim=neutral (no key) header.i=@suse.cz header.b=F18qGxTS; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=O8wStvwX; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233853AbhFQQMa (ORCPT + 99 others); Thu, 17 Jun 2021 12:12:30 -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().