From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 7612B3CAE93 for ; Tue, 2 Jun 2026 09:27:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780392433; cv=none; b=q+L+HdwuoSsV04Fy37bDaTGcevNwYYq+yzKAjtqbyKudLpYDBZ42u+zkFM0ioL4/qnXkr9jsgvWhZtc7wF0N8k54DeJ8R4xl/q8k79Tmb5+cmtENM/kbakxreK303ay9+skx7R3sRQ6lWdKgD2wStZOGujWsgCjnLuN/BJesJrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780392433; c=relaxed/simple; bh=M33NTbtwQR9F95umErmtiR+VlJXuRXuGvhc25Hrb2Eg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R9G49y1djic1kTaezKHsqVWbekv1IXVYKXeJ6U2NkynXMvsvidRYUbilZbsf/tfQEhEVhJV9OkdQesUwQFf8OwHiRH5yYu3fvbDCfqGqaSvnqgYz792uSQ3FQRS1R1UrAflcaJBFuOONrkMP5HLCHlGRa6jHiE7KJAwFJ/4h038= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=INq90XuV; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="INq90XuV" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-68d2342c5e6so3363092a12.3 for ; Tue, 02 Jun 2026 02:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1780392429; x=1780997229; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8xj507zVwH4D1UTAxqa+3yn4B7/3s6P++nE9EZjUyMs=; b=INq90XuVNVQCYobwCSbIw49KlvlFf1RV/9OJUt0njb4xhKoBe43YZRQXvvp3khcc/B m4Jp1UKuNzISHuOzhvV9erWXZo4nQrA1hjc+AUsUF9Jp7hnOm0O0NDVKruugdONgYbeQ w8nEuEO2wzX2zvkyMZYHIoyMIZWaS1/jeSuCBkVRQ1+qE1IxVCg9SKQLPKu3pBoyS+y4 3apa5ONqIumH3rN+Tath5+Kk3t/xDGeqYHiIIQ4ZIXsuffMmpT71GPKRNBGLZ3W2dzpe cr61Fd5wooVq8wIoddYEG3LOdUv0TKXD7R/Vbog9YpQ+EiqLKpuR1Yer0M723Bkc/0tU uS8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780392429; x=1780997229; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8xj507zVwH4D1UTAxqa+3yn4B7/3s6P++nE9EZjUyMs=; b=NaOy0qwkhmBVaCRR5WCpEgBuW6TXKsJdOsC7WBt9h+Rf4gaDd2hljkXmY1KKj9euze J8gtZStq6gUzyo4D9oeOy0ZBVq2fksvRtAQJOgLUfWj8lOQwgtj5lh17vPsftDS3exxD AD5pGS8ed8dhBluO/+PAs9Hwbth5ejNUA4vKgH3KOdiaobmtOzxElILeFhHhDkhGUiuM Z67EMEi4h3+bxRqjElhK8pYYidpUSrzc+QnTYP9WAiI1X2yN67Qi/aBe2gT8sH/IXe0M p1bttCTOnIJSVxzYQCwSQfYeOi4rFdJ54GVClLF0BhKxHjD+kYwRzrntqkuSzoYG7Yz2 NrhA== X-Forwarded-Encrypted: i=1; AFNElJ9XmTB8Aj5YKVEfNroA77C/L6P6g0tsZmw0yAQv+HoSfU7ePdhwVDvDSzDqo3AUCqXV6WlyUk9cD7w2cRg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxb5mffcfRKpx+fHTCH73QT09zlohgWtX4HCZerKuUNGRI0Q7Nv pGzLjmuW/EPFz5bO+SKp1utAfTifEVQLI4FAGqCtgr/flMu6DMRkI8PnCogztTDsBe8= X-Gm-Gg: Acq92OFmh5hCNwPjmrlwR0WhtDhj6pd3fCa2of0eaA52y74q/WkphmgP91fpVK4Rltw WGu/ow4kbd0Uw1wK4d/GasuBTnmi7xoFFpgNQ9UlCBbhDV0Nci8dISvXlMNruyT3we6NeA5pXoX BQF/MygSAQ5KHEk2JAdnLsvH6pPTe6GQ6TwS/dZcR7EgTIyrZ9jef0uNjw0fUIoyTAdfWTl2jfx E/lAoRDz7i1EilGoedFc0emI6qpTKlqZx70DSEZiYQj9VeSLuSj9K6j4bID3FWdeI794+hAQMGa +44PwAEnW8blCIjKx4WHqSSueVtkgbOdHkAXnAEcA1SiriCRc9GRiY2sIo1Fu/vQjkalJX6Sbw+ MsX17nykIhlMdMERRqapDagFWGc/OJs8dz9Osea4YXYzUnlA5Kx3kD69dBnKJgpPkhqiQZI7PFe 5B80vCy0RlLNUNqU5bDhCFKLeTUB0p9G9Iw+I1M73jilSyhlD3nS9bDw== X-Received: by 2002:a17:907:a786:b0:bee:a4b8:d595 with SMTP id a640c23a62f3a-beea4b8d664mr333399566b.7.1780392428574; Tue, 02 Jun 2026 02:27:08 -0700 (PDT) Received: from u94a (27-240-75-84.adsl.fetnet.net. [27.240.75.84]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84238f1ce65sm8655498b3a.5.2026.06.02.02.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 02:27:07 -0700 (PDT) Date: Tue, 2 Jun 2026 17:26:56 +0800 From: Shung-Hsi Yu To: Jerome Marchand Cc: Mykyta Yatsenko , bpf@vger.kernel.org, Andrii Nakryiko , Eduard Zingerman , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Kumar Kartikeya Dwivedi , Song Liu , Yonghong Song , Jiri Olsa , Shuah Khan , Mykyta Yatsenko , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/bpf: Page out as late a possible in file_reader Message-ID: References: <20260420134637.2513867-1-jmarchan@redhat.com> <836b0ce8-f427-434f-984b-4fc60b02c810@redhat.com> 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: <836b0ce8-f427-434f-984b-4fc60b02c810@redhat.com> On Tue, Apr 21, 2026 at 07:59:08AM +0200, Jerome Marchand wrote: > On 4/20/26 6:52 PM, Mykyta Yatsenko wrote: > > On 4/20/26 2:46 PM, Jerome Marchand wrote: > > > The file_reader/on_open_expect_fault fails consistently on my system. > > > It expects a page fault on first dynptr read of some range the exe > > > file of the current process because it has paged out that page range > > > earlier. However a lot can happen to that range (which depending on > > > the actual memory layout could contain text section, data section, > > > sections )related to dynamic linking...) between the moment it was > > > paged out and the moment the bpf program expected to hit a pagefault > > > actually run. > > > > > > A bit of instrumentation with mincore() shows that pages from that > > > range were accessed several times before the program is run. In > > > particular the call of file_reader__load() seems to fault all the > > > range in. > > > > > > Move the call to madvise(MADV_PAGEOUT) to just before attaching the > > > program to minimize the risk of having those page pulled back in from > > > under our feet. > > > > > > Signed-off-by: Jerome Marchand > > > --- > > > > Thank you for the patch, the change looks good. Does it fail > > consistently on 4K page size? > > It did when I ran the test manually. On our automated testing system, it > failed intermittently. On my fork of BPF CI the test was failing[1] consistently, even when this commit is applied. However I wasn't able to reproduce locally on my laptop when I ran manually. Any hints regarding where to look and how to reproduce? Thanks, Shung-Hsi 1: https://github.com/shunghsiyu/libbpf/actions/runs/26807198259/job/79027625188 ...