Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2249788lqo; Sun, 19 May 2024 22:28:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWj8pY1ERl+GTZASfBKO0v5EC+wwnUMyl4UKXpglC1kXh/oSN595yRHgWLR9P+19KbJaWgdbQBa+8rcnZcu6j4yx4kIaUu9SUHyiwaOnA== X-Google-Smtp-Source: AGHT+IEr4T8IP4VvFH4Ucxof403MLV5Piz8A51F1F8dw2Nddpxq6SEeYiAWdmy+nhxV0q4KmxFMD X-Received: by 2002:a17:903:244c:b0:1f2:ff65:d2d8 with SMTP id d9443c01a7336-1f2ff65d60bmr27644625ad.27.1716182913970; Sun, 19 May 2024 22:28:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716182913; cv=pass; d=google.com; s=arc-20160816; b=xC+WMuf224FTDUygFVnk5d/YxqdaWZFo75mgdFahCtgLlCZ1CFwUUmxx+Y7VLA3Wtc wkhrZFWV8g57uJe5XpMDGToenxgVcUCdQxsZp8r11Vp0f1Fgk1SsWs/i6Ai+Sb2yOQ7c wBUbQKfqwxSZMyCv/28+lxsq/cSngxevwbzFoPEw9AMQuSh1en5f/w9KjCYjBCXzxj6V q8FJU6ZeviPPfShp1//6UgWVJGka+z931PP9CMFGslSosAGAaAWMpFNWKKpbsjgl3iFT VXCfOPbruYXFnWjLpF4wEwwtRMiIKmyenWkRjNIQltCQ8XmI/uxVkU9qrXFAmhByA3Wf o/sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=6gM/vwsTnExUAhnt7VJkvcI5yziT0rLqYSZpv5r7v4I=; fh=gRK7KNFUm0yBJNDPMP27JdZ7hVvjXVDlEeTXjBTi8Ac=; b=bfiV/mpkepVX5Q5ij9EpAekfcMkl0rgiBcJ3wji4jrAbyHAHYyvGvJcdQHJTijL7Ps 1s271mf1p8NOlvUODJVamt37cZwn3GHcYiZWAl3oZhXRwfGLEOcbhT4JI1awinVpQoGn Ji/cqooywnyvL1Xxls/5anhABOKqqSWFS3tq2m4bAnp1ebyuIorlcT3wLe8ZYAzsT5ul Kq/ORGA4TUZRDn7OlZEIwMgqFHy7rjHI/98ad/gE6zT096o6zeVhta8t1b4tnMbicQ34 g9K07GheFozjwVmvFm5jAvyTQJe2IHHswn2OlV4xpkMM8YdvnQKyOAoFRllZUFvN0L0j hyJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-183420-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183420-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bad7d96si17967105ad.191.2024.05.19.22.28.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 22:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183420-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-183420-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183420-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BE6A8B215C8 for ; Mon, 20 May 2024 05:28:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DF53171AA; Mon, 20 May 2024 05:28:20 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84EA4101C4; Mon, 20 May 2024 05:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716182899; cv=none; b=ag8xasmn9IrChwfECFyqd4SrtrVyxkB752H9VzV93FM95MJRiV+mtul5TVwR8nBTE4/1ks889Zq0Dtg7L5yKWX2UiXNPgBDAMC9R+47bo8k6YquvyjNK8T5OgxeixVrb8r4qkZ/cpyZ/YYRO1CRJRTLQ6kMpu8+AK9c5IGqrKls= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716182899; c=relaxed/simple; bh=6gM/vwsTnExUAhnt7VJkvcI5yziT0rLqYSZpv5r7v4I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rJJkV6EQIJeMI9FZAyqY/GwieqYyuSCiePDLXWe9GarOnVCW/sfiUbeaJPkSo+5zhd/iuvfc2liGtkK5WVjNdSqbEyIPpmf50wuKLHEBlMB+1PppHCgRUnOnBz3TnsUjuwwXQL0Kox9XQAd2fdn+HdOUm/n/44dzoj6rJaBHil0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AEF64FEC; Sun, 19 May 2024 22:28:39 -0700 (PDT) Received: from [10.162.40.20] (e116581.arm.com [10.162.40.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DBE7B3F641; Sun, 19 May 2024 22:28:12 -0700 (PDT) Message-ID: <93c1392e-47c3-41e2-b6cf-c41166bdab78@arm.com> Date: Mon, 20 May 2024 10:58:05 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] selftests/mm: compaction_test: Fix incorrect write of zero to nr_hugepages To: Andrew Morton Cc: shuah@kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Anshuman.Khandual@arm.com, sjayaram@akamai.com, stable@vger.kernel.org References: <20240515093633.54814-1-dev.jain@arm.com> <20240515093633.54814-2-dev.jain@arm.com> <20240519170024.c2e62a7b69b00bb30e86a157@linux-foundation.org> Content-Language: en-US From: Dev Jain In-Reply-To: <20240519170024.c2e62a7b69b00bb30e86a157@linux-foundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/20/24 05:30, Andrew Morton wrote: > On Wed, 15 May 2024 15:06:32 +0530 Dev Jain wrote: > >> nr_hugepages is not set to zero because the file offset has not been reset >> after read(). Fix that using lseek(). >> > Please fully describe the runtime effects of this bug. This is not a "bug", but a discrepancy; the following comment by the author says "Start with the initial condition of 0 huge pages", I am just ensuring that that is actually done. Although, I am not sure about the utility of doing this in the first place, since we are anyways trying to increase hugepages after that. In the second patch, I have moved away this entire logic of setting nr_hugepages to zero, to the place before we start filling up memory; if you feel that this patch is unnecessary, we may squash it.