From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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 2B62233D6F0 for ; Fri, 19 Jun 2026 19:33:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.160.174 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781897637; cv=pass; b=eL8UIKnPph0GYsq44DlpfIWrY2ebvS08iGY3xzTI61dUyj+38tQs6K2O5lbmfTnQN2nEbhIPEErOE0mQTETB2v+BVXvIrC5CS9mL4XC6TtaZJS7tXlkW0Tz1+n+yBdxonpLCRpF2LzHIeFZxne1X4Da2NvYc6zyY8W3jVQ4Arnw= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781897637; c=relaxed/simple; bh=+f8NJEu4qsRplBiOZq4PNX+X13+IyWrjmLblIVa6icc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=p0K0tkYYsYBqIRFKj0Lgn69bNMo9y6z7PHITpPIHMXW/lmlAS+FLeIJRT11PrSQiymNuTjght3OxaFxXHaonc9yARE39kR1wKYbL9iQ7Jo/iw4TyMYxkpSO9H98P7HZkbRyqARrCyo5zaZx9qLzoLwLEJ0q36MxILfczvzgvlpU= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=pEgQNTcG; arc=pass smtp.client-ip=209.85.160.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pEgQNTcG" Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-5177d1ff061so255791cf.1 for ; Fri, 19 Jun 2026 12:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781897635; cv=none; d=google.com; s=arc-20260327; b=okxH0GbYe+kVNwhYCnwu3QFXv39OjEo/z25v/VFEvvTS8D+OfGMoXNIWgmDU1fsNL9 /D3oiRypLVu5syTTB+D3J3ZB1Fb4zm3aSiUMX04MLE0krhe3JLFNia7RIMTrYiBupsrk cYzNwFwAQ4g8mPhWO1VjOMY/VClcLfoCu91bl1FzPD3yIDbtGO1g+902TtiWlHYILc5F l060etOH7K2lTaksIVPTkY3kziei+0xPETIXrhN1kFFJVa5J38PDG6otpO2IEMbQV+2M D6winypSMMcfIQEHczesQjG6VQ3IW/yoKBc5XprFhaQD58OW8YVERJP7QIab3Kxmp4TV Hyvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UixWekKQ1E/9s6EcbfIpsM1Q9ZWGO+u8pFvuLswEpPA=; fh=Y8JCLXnDxH0Oen40OXlHZ4CYkQRzUP2b+q8wNwIiP6s=; b=GJt1NVI4FAKL0yWUoyM3VpWscPlyWMXuCqtv5gAqiGm9ookpeY4WDOK1NiuqoYIrMm u+aiqiHlRAAnzLjs0GgmArP5GiWO0V17K9vPxJM81UA8X9UiVW9A287eMfn1D4uInGrc Op3tmhmWafHINwmEc4/b7S2LPJY6gEA6o4rsPkjMPT2r1vd4w3K+RHxo3De3lotVSdLf imAvYQEGeJ3ytv/zhDxEdPFNlhNyLGS/UBGngdafyq6nvamZUkcdvskIhga8hQI1nEVX mCaVsK3yJDYG+HPHcQhGCk/A3SLtcMoPTRxnl3i80EtcXxVnLz8MT5CFBU5Wt9sy4ws4 F5mg==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781897635; x=1782502435; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=UixWekKQ1E/9s6EcbfIpsM1Q9ZWGO+u8pFvuLswEpPA=; b=pEgQNTcGtNelMos4zMWsN4wjhoHHXQam4z5ESN7icVVkUFhO8nlanI5wBnfp4x55SC V8rLbHf5WqInmv2DZDK1IVUPOWQQg3PXQnSEutlqBfDnwSN70hpTBW2sAvYTdwpfwsD8 NzLylmKrD8MwCOR4CpjDrriX+0q/wt0s6clEJ7VKDv7rMOpwUNpb5zopB5ZA7JZI5TR/ qwhOU/9g+L94wMw/kQJ5aD3WvN88NCuepID5mHRLRzrEh2iJ4Pm4KM/JUxZRRj3lGL9D nmmpMJJ/AkwgVkjaa126FzuZH9DyzUyUKHYvWfsrT11KpGuiGzN1YkOFm8dpoYBgzxh0 qlZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781897635; x=1782502435; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UixWekKQ1E/9s6EcbfIpsM1Q9ZWGO+u8pFvuLswEpPA=; b=VkH0sgoNF4fxiVx67eoujloAXPvWmxP+MJpR4FpJMNXzYW9VAUcW2PrwmWVXRo4jFS c+pJvBNmceXSS0FSJjZsWLs6L0PvOaNf4cM4vMRyTSqyUdHDJ7zunGm9ouDYKPc0p7v6 evVI62ulbGPjRdSzyso7xb2rhe8aIkWx12ghlEXUBnAhpERivXkHaStTtJazKjVAv0th 6/gyAqesWafmHvSlNbkrbkyn+7TkoltQNES3Cm/m+dEABmBvUJUxXOzpy7Gss99C201V F10CRog2W6OTYUk5Eglec+xuzwsmRyfZPLrB0iTMEuH+3281JBCEq8Id/emk/tuujAr7 2+1w== X-Forwarded-Encrypted: i=1; AFNElJ/8lfQi9eD1jwvaRtkC/fBMgcpvab46HMuqe7Q7X8e7l1SW9oSLoFN49AhDYoGkqznpQLWpG/HFChLaux0=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3dUcaTqNr+7nXLa5kOZBFu/KJ/xdOWHKn/qukmpuTdgzQdEb0 sxB/zk3p0gxdgxgpuyMtEkRITsuY4vcG5/JhRlZ4TfpXHY+Vol0bSkagIxw9EbMcmXYwGKmMhk9 k5pgoSN4IZ2H2r3stecxWcwpYzB1CgPMVgRGDflTV X-Gm-Gg: AfdE7cmtWxfbbhwrqjJMI5EHYiISD4/T1mi/GYgnAWuLUZ0Pgxyknvp8k/V5WxgDePp R3KDoHyiRFQVfjPX8TMeCjFPuM10t+kNYFPGaozUj1ptFWLr8cFqzJBO4KhcMXkUxGhRZ4GfLjH hVtpkXQ2R202TjmIlq0Ljbttwtsn9nx77WbaYpQjCHXJDoYBZnRdsYfK0FnxAkiYpu+51HCv3+n yKrJ/oYHfZyd9LzqNi+GmsERNbWQkQ9CX2wXCSG7wUnqu3pYnIE+mJcyLmDcXoMsZ3PBrc= X-Received: by 2002:a05:622a:4183:b0:517:5ec3:b59c with SMTP id d75a77b69052e-519e489116cmr11379961cf.2.1781897634481; Fri, 19 Jun 2026 12:33:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260619112852.104213-1-ljs@kernel.org> <20260619093711.d0d37c9920b3a16394c356a6@linux-foundation.org> In-Reply-To: From: Suren Baghdasaryan Date: Fri, 19 Jun 2026 12:33:43 -0700 X-Gm-Features: AVVi8CcQdg_GeSS44UmY6f04HdsYstBTwAOA63kTc6IMW2JgtuBGnEWqPtwabq0 Message-ID: Subject: Re: [PATCH mm-hotfixses] Revert "mm: limit filemap_fault readahead to VMA boundaries" To: Pedro Falcato Cc: Matthew Wilcox , Lorenzo Stoakes , Andrew Morton , Frederick Mayle , Kalesh Singh , Jan Kara , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jun 19, 2026 at 12:26=E2=80=AFPM Pedro Falcato w= rote: > > On Fri, Jun 19, 2026 at 10:52:07AM -0700, Suren Baghdasaryan wrote: > > On Fri, Jun 19, 2026 at 10:46=E2=80=AFAM Matthew Wilcox wrote: > > > > > > On Fri, Jun 19, 2026 at 10:43:06AM -0700, Suren Baghdasaryan wrote: > > > > > Yeah, the mmap usage on SVT-AV1 is a little suspicious, but I gue= ss the > > > > > pattern may come up time and time again for people doing chunked = mmap > > > > > reads. I think we need to take a closer look at this change. > > > > > > > > Frame-by-frame mmapping for a streaming workoad is quite questionab= le > > > > IMHO and I don't think we should be optimizing or encouraging such > > > > usage, but I understand the reasoning for the revert. > > > > > > If userspace is properly tuned, it doesn't need automatic readahead > > > at all; it can disable it and issue manual readaheads. The point of > > > automatic readahead is to cope with userspace which is doing stupid > > > things like calling read() for a single byte at a time. > > > > > > Could it have better defaults? Maybe! It's worth a try. But those > > > attempts need to have a very low bar for reversion when it turns out > > > they affect other workloads. > > > > That what I meant in the last part of my reply :) > > > > But in general, I think that benchmark measuring "how many frames per > > second a CPU can encode" should be revised so it doesn't depend on > > file prefetching mechanisms. Otherwise it's measuring something else. > > To be clear, that's not (necessarily) a benchmark, the code we were > looking at is their encoder app. Ack. > > (it's also generally not possible to prefetch the whole thing into RAM > because, well, raw video files are quite large) For such streaminig workload I think read() would be more appropriate, and the change limiting read-ahead by VMA size would not affect it. > > -- > Pedro