From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.migadu.com (out-69.mta1.migadu.com [95.215.58.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73B294B049A for ; Sun, 16 Aug 2026 12:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786884855; cv=none; b=hhj4JcNcBJj/ozLrEoEuYtFdDumJemG8aWVjEuEOXnuV3XpDF1dVBz+JKdaSARXM9iOHM5Q0aHSLhoSGSstS1uxS5EL4Y/971GjE0WHgdZB2ptHDoJAaAHFmTjvTO7QKgza6bYXp48YAtoUmx07++g596XETNLN/9zHZL3Wn9iQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786884855; c=relaxed/simple; bh=N0ecmulvwAW6hOU2et5uEcTBFNDH36ebOvhxW4X+wLk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=JL5WOsp+K9W9zj8HzXMr4mzF2SSIbLOELhQFi+soHGBlUah+2tK+wIOdlTAQHRhabnRa95HdCs5v5xmkps3wE6J/r/7W6Nb7uKeCmfgLcv0CrDbx67xgwK3TGI2UglqS5WQmKF3GoOel1LYqZCCJTr5NiM0momHcRlFgh7qSmbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fFaDJhmz; arc=none smtp.client-ip=95.215.58.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fFaDJhmz" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=N0ecmulvwAW6hOU2et5uEcTBFNDH36ebOvhxW4X+wLk=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1786884848; v=1; x=1787489648; b=fFaDJhmznbsaa9bjEHdOnIgNxjs2SZ1wpgqDEv8w2UbO47RexC/nYXbdFJkh0lB8ZF9dbxxX VdlzpDuFVXySohE4yU3rkwxsr2gjB3Hf+dPJdyoWwBAuzAwsdADkSmtcFNHoR/uVv8nmFUwV6+O pLHvDJx0BV/TTl5aLQj++pDQ= X-Envelope-To: linux-kernel@vger.kernel.org Received: from localhost (2602:fce1:44f:115e::) by smtp.migadu.com with ESMTPS id f39b70a9d02f047e; Sun, 16 Aug 2026 12:53:58 +0000 X-Migadu-Flow: FLOW_OUT From: Lance Yang To: david@kernel.org Cc: akpm@linux-foundation.org, jgg@ziepe.ca, jhubbard@nvidia.com, peterx@redhat.com, yang.lee@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cuiyunhui@bytedance.com, Lance Yang Subject: Re: [PATCH] mm/gup_test: keep longterm pin state per file Date: Sun, 16 Aug 2026 20:53:44 +0800 Message-Id: <20260816125344.9813-1-lance.yang@linux.dev> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20260810-gup_test_data-v1-1-fb1d41be5bb4@kernel.org> References: <20260810-gup_test_data-v1-1-fb1d41be5bb4@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Mon, Aug 10, 2026 at 01:31:14PM +0200, David Hildenbrand (Arm) wrote: >The pin longterm test currently stores its data globally, shared among >multiple concurrent users of the interface (multiple open file >descriptors -> multiple "struct file"'s). That makes >the gup_test interface problematic to use concurrently: two users, such >as concurrent selftest runs, can interfere with the same longterm >pin state. > >While this has not been observed as a problem so far in practice, let's >just handle it cleanly. There could be a way to trigger selftest >failures by e.g., running the cow.c and gup_longerm.c selftests >concurrently, but we usually run them sequentially. Let's add a "Fixes" >tag to be safe, but not need to CC stable. > >Fixes: c77369b437f9 ("mm/gup_test: start/stop/read functionality for PIN LONGTERM test") >Reported-by: yunhui cui >Closes: https://lore.kernel.org/r/20260608025043.88087-1-cuiyunhui@bytedance.com >Tested-by: Yunhui Cui >Signed-off-by: David Hildenbrand (Arm) >--- Gave it a spin on x86_64 QEMU. All good, shared-state mess is gone :) Tested-by: Lance Yang