Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1457590lqt; Fri, 7 Jun 2024 21:39:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTbCIGYhRGn3ddQ/1VBp7zaEapQl3BUiAPowGGYZ61WJNFrJicL07pdrIarsakdBa0TXevKWwynIeqr308f9YDZDBw6CfTW8/If6kAyg== X-Google-Smtp-Source: AGHT+IGFRrGINCtrPjif+Cth/WYB19Na5KcbjFq9k4PdQIQ0mHKz4ApSV2pcNIY+9QcaQ3Y1QM+V X-Received: by 2002:a05:6358:5916:b0:19f:406b:2021 with SMTP id e5c5f4694b2df-19f406b222emr47344255d.19.1717821584629; Fri, 07 Jun 2024 21:39:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717821584; cv=pass; d=google.com; s=arc-20160816; b=tmI4oCqO4KIj2GJ2ZSx8/MDPRWY0n4qf2bFc75MoKXRCb4I/Yvnw4OGZh0itx60Yah H6CqX8fnl2lVJYTxAtgFnyP532Cjxu9SRFjKDIdipYE5NZdddet2ZiKuSkLqDCYsABg3 hnf3FqU4DSSf37gW+pFMJ1EVlfEoteJZUQ/5TJjOwMkS2U4+CcW4efcJgmB99Qxx+MT0 b5/AnezMyQhzvHae3AjZISEvb87fsA6iVmUbJektzYGbVioj2/d2ryr/o6vCFuAxxxWH TgdAipYzlTLFz/0mQqPXu0ieFeVHmHpyoC20KFyJT8jSwX008JHu968iH9TPyLiwXwHv F/Xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=hQypJ32JalZ0cg8bvFqlkbvgZLv5e9Svm388bLQPiME=; fh=cUk2sgOvuNWxXkOQCBStPQthsjVYmqkkpivqKz3/X5M=; b=M+JYgPK0heaonP/zp335+usDtIG7fgtjLTlgUbJKiJItj+zbYUOo/E73mvtM71tnd0 FbHIbUtscPp9qModFSy6y+qJDmcCCQ1+bwz+4oIx+DcI9DzlYwWrdYkp10kEfDy56stq QOY2nOsqwf12dFYa1/ucNR90r/IvIG8iQ9vpJqV9VN5QbRLfijoSlRPp/H0HjSPtcjth 0cAr2LEWuxNhC7RQyd9zLVjCkbnzLTIclMzbsdAyBiPDAEg+H8ZHKZ5rszfgkoOt6oVK T6fOeHjfKxD09ChkQ7NmaKihWTbp1dXOJ0Jsp15d78TetvzMFH84DBlq4ulXxCmiFrhW OTmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=nWCE2ohU; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-206903-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206903-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e02d8fd026si1009777a12.830.2024.06.07.21.39.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 21:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206903-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=nWCE2ohU; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-206903-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206903-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3832A283B82 for ; Sat, 8 Jun 2024 04:39:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5507D12E71; Sat, 8 Jun 2024 04:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="nWCE2ohU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DD0A3D68; Sat, 8 Jun 2024 04:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717821578; cv=none; b=YgsnoPdDkGrp3OXyHPn3A512PuLHnVv6HTazvuicOUthJoW4B7rPhC5+VSnH3nfe/eYwvY2tXq3TSjkqPuYRO1+3/jZ8NZ3PV0UBWrMg+vMwNkYKKQS3DTi4rmNmFiTJP/to2ykXj331kWUODv0NqoxlK6z/16Z5mvyas1eljY4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717821578; c=relaxed/simple; bh=0SEMGfwmVBBa9SW6qjrXV4oYQIyBf9H49FvAj7GthAY=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=eWn4mJ0HZgeLV5STti2Ao+IstFCZv8EncUkd9i0mCYWlan45i5x2+qbxGnpLdVpaG8/3PsOvJnbSMXO4bfQf8XnrOsU0skfHX1q7RzRpbIRe/M4RuMM/85/Uw163Mu4QzHXZPuIMC2HGBg8MjrzJR9Bn+vPg4gMynJqIUyzxweU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=nWCE2ohU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6873DC2BD11; Sat, 8 Jun 2024 04:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1717821577; bh=0SEMGfwmVBBa9SW6qjrXV4oYQIyBf9H49FvAj7GthAY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nWCE2ohU0p5JfW06/Z6E8d6Ezt4RMf1Y7XdlACppk1QWxGvyts1ndltbyeYQu8gJo hIL/OPYc3jTeB5LDlYc5NShzW29jHIQ2ZI2wHYwHsFDfyzOVpIfaexxO65T2w7JYXv Hx5bKG6I5WZk4V1iij+5PkKR9q2ey9K89F6U13B4= Date: Fri, 7 Jun 2024 21:39:36 -0700 From: Andrew Morton To: "Pankaj Raghav (Samsung)" Cc: Shuah Khan , linux-mm@kvack.org, gost.dev@samsung.com, David Hildenbrand , willy@infradead.org, mcgrof@kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zi Yan , Pankaj Raghav Subject: Re: [PATCH v3] selftests/mm: use asm volatile to not optimize mmap read variable Message-Id: <20240607213936.a58028617aacdbf6913d3735@linux-foundation.org> In-Reply-To: <20240606203619.677276-1-kernel@pankajraghav.com> References: <20240606203619.677276-1-kernel@pankajraghav.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 6 Jun 2024 20:36:19 +0000 "Pankaj Raghav (Samsung)" wrote: > From: Pankaj Raghav > > create_pagecache_thp_and_fd() in split_huge_page_test.c used the > variable dummy to perform mmap read. > > However, this test was skipped even on XFS which has large folio > support. The issue was compiler (gcc 13.2.0) was optimizing out the > dummy variable, therefore, not creating huge page in the page cache. > > Use asm volatile() trick to force the compiler not to optimize out > the loop where we read from the mmaped addr. This is similar to what is > being done in other tests (cow.c, etc) > > As the variable is now used in the asm statement, remove the unused > attribute. > What are the runtime effects of this change? An inappropriate test failure? If so, shouldn't we fix 6.9.x kernels also? And is fc4d182316bd ("mm: huge_memory: enable debugfs to split huge pages to any order") an appropriate Fixes: target?