Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp3125034pxy; Wed, 4 Aug 2021 03:02:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzzv2qhUWppTDf6XQqledesysGVqNs2V9ppDdIecKv+MOgztj+x76TCzr4/NA1/3PikZQi X-Received: by 2002:a05:6402:40c4:: with SMTP id z4mr14296261edb.120.1628071325816; Wed, 04 Aug 2021 03:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628071325; cv=none; d=google.com; s=arc-20160816; b=Un32pePknb5OQQOMmCpvuARa+6BjZC4p1bnOMoi5uuosdpT9O4PG0Hj4oI0ntgRsuK ucNPeVu0Z/ywH6xa7LJ/mvRnFHgfbzHs4RlQdAt0A2xVlA9DEkYpKvJlnPgjNoFh3a4d 6ijMAP2afIOExjdIRKDbToHyS7pFnU4vUaZmge0XNPelpoOIoy68YInVJHdrPLSxTmMa w/oFYjksaRzINSeZanUxpYfvqr7cyWshA+S3YYLfCGozIxl8OkKUylRt2p6w6Wn8wpCl IEMD6IXtjdCjiF+Tm/wYJ0lxCQ8CI4T3Q+ZSigqzIlF9S2LLLFbJsvMUtkmL15Ca5AhS CciA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=2421IgsLdFvZrrE2NgG7rCaH0Gz5cnUmm+AHcF9TLqY=; b=T5Jiz/qSJgg2XZSwQQ9i70rR0zRit0dFNmnmRtZEej/DOyOUOSzr/LTjErPraLKnlr o02GzztYI4KCW1UGemTGlC6OtNV08AKRJ7ADKWpvQZAkHl0hFoPiiFfre9dTd29gcgw1 0kXD5O6XJD1B6Ff6XuXjkMl+lszTAkIPbWUGUWTTw6T4UzrBfgw9xUIcCiihwgeIVFBh Ki8fxhhi4N4R7AkCja/L1yX++O6jIOAclm49yJD1wu+iVtp5cQMibnaIxC/OTunSfJVe bCFVnlM+7+XJEI9qtcEfeSqIxvrmdFzQoopqbIiLKOqUDDRCe3JLlepOz/hIrnJ5Rq5Y BODg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh13si1553581edb.447.2021.08.04.03.01.25; Wed, 04 Aug 2021 03:02:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236801AbhHDJEh (ORCPT + 99 others); Wed, 4 Aug 2021 05:04:37 -0400 Received: from mga03.intel.com ([134.134.136.65]:13712 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235471AbhHDJEh (ORCPT ); Wed, 4 Aug 2021 05:04:37 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10065"; a="213912681" X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="213912681" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 02:04:24 -0700 X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="585373319" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.159.119]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 02:04:21 -0700 From: "Huang, Ying" To: Hugh Dickins Cc: Matthew Wilcox , Andrew Morton , David Hildenbrand , Yang Shi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Miaohe Lin , Johannes Weiner , Michal Hocko , Joonsoo Kim , Minchan Kim Subject: Re: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page() References: <20210723080000.93953-1-ying.huang@intel.com> <24187e5e-069-9f3f-cefe-39ac70783753@google.com> <8735rr54i9.fsf@yhuang6-desk2.ccr.corp.intel.com> <704d597-443b-32f-84eb-524a58dd8ef@google.com> Date: Wed, 04 Aug 2021 17:04:20 +0800 In-Reply-To: <704d597-443b-32f-84eb-524a58dd8ef@google.com> (Hugh Dickins's message of "Tue, 3 Aug 2021 22:34:52 -0700 (PDT)") Message-ID: <875ywl4m3v.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hugh Dickins writes: > On Tue, 3 Aug 2021, Matthew Wilcox wrote: >> On Tue, Aug 03, 2021 at 04:14:38PM +0800, Huang, Ying wrote: >> > Matthew Wilcox writes: >> > > But I REALLY REALLY REALLY want a reproducer. Right now, I have a hard >> > > time believing this, or any of the other races can really happen. >> > >> > I think the race is only theoretical too. Firstly, swapoff is a rare >> > operations in practice; secondly, the race window is really small. >> >> So do something to provoke it. Widen the window. Put an msleep(1000) >> between *pagep = NULL and the call to get_swap_device(). That's assuming >> that the swapon/swapoff loop that I proposed doesn't work. Did you >> try it? > > I've been doing that swapon/swapoff loop for years, while running kernel > builds on tmpfs going out to swap; for better or worse on baremetal not VM. > > You're right that few will ever need that level of reliability; but it > has caught problems from time to time, and I do insist on fixing them. > > I'm not as insistent as you on wanting a reproducer; and we all take pride > sometimes in fixing ever more inconceivable bugs. I'm not against that, > but it's easy to end up with a fix more dangerous than what it claims to > fix, rather like with random newbie cleanups. Yes. I totally agree, bug fixing is hard. Best Regards, Huang, Ying