Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1557178lqt; Sat, 8 Jun 2024 03:23:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWz4/qWcWZpWfNfba1jdZ3rQPHf8pyqRboE78WWDstSciY0Mz7leesoH3yVUkPaW7nHEw6p7GCQmUIctWNGYFNReSiX0i74WisJQNydvw== X-Google-Smtp-Source: AGHT+IGGM1hhx7mIwGT0jYJytWZAP5rXDMb+PEhEocvp7QxKZgqGEepwmXQGLuHCjBGVxfpkJ/ao X-Received: by 2002:a50:8d43:0:b0:57c:72ee:a869 with SMTP id 4fb4d7f45d1cf-57c72eea91bmr213582a12.11.1717842194915; Sat, 08 Jun 2024 03:23:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717842194; cv=pass; d=google.com; s=arc-20160816; b=S5peYUuLA9rQgUnotTIBMCgo7i0bZy2PCC792NiI2l0wRAGNdg/90MzreEJZy6GqeQ EmCLXXtNQ+s9KikwblavAyu7Jdy6hSBQQAvoy9Dpp39Lq/G5DugTqmVp8iAIgOGnutCw LTOtL4MPTonNLz0DviSxn9dYcQ7ED0S8V1c4TsfkcjGcH7zZgp9l5HO/Xe3BQG3TM8fH WnOGYXvFfktpWMTxXIWNa1+1imJ/RvgSA5Nfe5frwqIqNLLJOn82ZPpsqn8MBLyQENsz K3t1+STCsmz7pOvXGEANEJbwxPx8dk+1LvIUeA4EowC1XVOD433cg4qg7mCdwDTGVscv 0xpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CN42FyvMLfGhJvGBn6PDLQsQ9W8XHB0kTB0fHm6THX4=; fh=dr9TILRyJBTGnzRbTcHkkVOnSX9YQU+bgMXUlAHX6F0=; b=zMla8HhQ5dxhkkJTgqOfjFK7NRy5RxsrU20S8ZT5vbmMQ95vdH2HXVYMRu7wNI/Lwd S3KyQMZ8W5F0uT65cUDmjhuIW2bxY8jqS07Ah6IJIhERwxKg3g0TZIbCGDUEjegqCgms Wrj6HaKzhvJnRuyNVM95c3L/xL5uOmqYv8KhpoCPoYgr1hSiiUDHkxZwZxdWZMx7H+UZ WdnN7rBBiMMQ64KNaYV5KE7+zNHhZn+b7orWYSb4M1iXUpVuUe8rvO2NFzZFPvM5wb/D LRlbve2P9hgB09yJ5igoOcWAarEhX6rrhMo7SBnA8vWRbu4JLHpVe0V8+FKHTJGSOo9m haJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=URCHGk+Q; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-207010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae26651bsi2711098a12.573.2024.06.08.03.23.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 03:23:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@pankajraghav.com header.s=MBO0001 header.b=URCHGk+Q; arc=pass (i=1 spf=pass spfdomain=pankajraghav.com dkim=pass dkdomain=pankajraghav.com dmarc=pass fromdomain=pankajraghav.com); spf=pass (google.com: domain of linux-kernel+bounces-207010-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pankajraghav.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9E2671F228F4 for ; Sat, 8 Jun 2024 10:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0EAF178372; Sat, 8 Jun 2024 10:23:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b="URCHGk+Q" Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (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 BE81F6A33A; Sat, 8 Jun 2024 10:23:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717842188; cv=none; b=SCt6/ESc+v4t3zxQO2VEtyd9JAomw2rf9ROLCtBcqPss3zGJzHbPxW/jn/iQSyDu3jtnDrTo0J0eLN1cNJ1+fbBG4CXp2VwxWhR8lYfxZeFDM1T4D1q2/kEWsjn/gMTFJ5YKS+NDZC/eTnzKgfB3zfZW3sK3/w1Pcok2cEd5r9Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717842188; c=relaxed/simple; bh=kMbwbEvgIsBDBdaKoxpUGxkOA8e3e1TQoet/J4VzvVQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K5FpDMQMtLqNKz8KHcXoEjtY9nelT3MHYwjgVoxBH36NHZFhgjb47bImDbDLOX8ZoD1aG8Oa668el1YvM04DiGUDkcUXv5FtwOPfVxWQibPng/o8ksbnzhDGjvyuNREi7L004y7+QPwdrK104jTJExONsEiVS95+W0/rEJE6gzw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com; spf=pass smtp.mailfrom=pankajraghav.com; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b=URCHGk+Q; arc=none smtp.client-ip=80.241.56.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pankajraghav.com Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4VxDfY5NTrz9tKL; Sat, 8 Jun 2024 12:23:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1717842181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CN42FyvMLfGhJvGBn6PDLQsQ9W8XHB0kTB0fHm6THX4=; b=URCHGk+Q/pp8GE03XIx3TgAxSXlyfltHrc7ciz8ok/N9IWHKZLo0jcuNLFJvMBZea/mOYj qTfORTIpOljo+10Nogd6KizUXFUfk0gz1tblu/FuEXezTBb/yvSv0DJ2sEGnEfD7DUGkFe 3Wdm8FjCTUys9nwkX8Ww6JIxzOdvFN4wDiGkzwpSX7w/3O5wOdlHOsqiRKOYMtwXkLbdCa VSTxIlmqKSjtVSe14q1oLJo8nDEiemQDhrYWMMZfu5N6Ug2GSA/zEU7nvs5DVQoHfWbvbL 3agMAx0T5waM5bF3iVr40vm02yirSz6xVimYGq7aTRQkT+vyp4Xn6Kzu8aKr5w== Date: Sat, 8 Jun 2024 10:22:57 +0000 From: "Pankaj Raghav (Samsung)" To: Andrew Morton 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: <20240608102257.edfsoqn7dt4s47p3@quentin> References: <20240606203619.677276-1-kernel@pankajraghav.com> <20240607213936.a58028617aacdbf6913d3735@linux-foundation.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=us-ascii Content-Disposition: inline In-Reply-To: <20240607213936.a58028617aacdbf6913d3735@linux-foundation.org> X-Rspamd-Queue-Id: 4VxDfY5NTrz9tKL On Fri, Jun 07, 2024 at 09:39:36PM -0700, Andrew Morton wrote: > 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? I mentioned it here in the commit message: However, this test was skipped even on XFS which has large folio support. So the test just skip these cases and does not fail. That is why I didn't use the Fixes tag. Let me know if it needs one. -- Pankaj