Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp545247rdb; Mon, 29 Jan 2024 09:58:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJpJxMH/PGFH1C8aVI8vrADxi6N/M8RoDMAORWvHrFOW+w8gjzhfK9/R2qS4nyMiUyoEGR X-Received: by 2002:a62:b60d:0:b0:6de:1095:4b9b with SMTP id j13-20020a62b60d000000b006de10954b9bmr4613761pff.7.1706551079892; Mon, 29 Jan 2024 09:57:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706551079; cv=pass; d=google.com; s=arc-20160816; b=mxuNgyWEhqRpDR4kF8kAiDOfBszAZkFZ4gtQGRLk5oUpFxlAjJBKMqAZsR1vgeIc+j 3Dt8Asolyvm/UP90oHY+M5LOaIreljkCZxxhkCLjW6aF0RKJ0pTbVEtQpXwog0Am1Zgn eExzZmiqizhaSeTkO+fWJYX4L7I/6LzUvSLZqhJn0R/DbrB4LxmkW20ax5+bS7LWK204 u6YvZ0UKoDmXG99gwyOIvlUKz6TcJKqQyVNYX2iBG0KGDBeTpangQjirtCg6afmCz5gG OFeo6PZt4WkVX/xhu10aIjkufs1eAWGmip3HsR0bhQRQtbE20gXJHvgKtPJZYW2f3g2D OHhw== 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; bh=bGSfs+oLah5p8atiIFDkPtIIBxDhbFoFkuAT3N8FnRs=; fh=dKrnSsXaxKrFYozKuKxyi8n/RR2qpKbRjYyqlW5sLxg=; b=xUDKQc2l2+fEKy1LfhIHMnO3Vy+q8goDTSY/IzCoxSbo6Yq4wOI3SuYr5loGR1rF8y BqAgUx6j8L4u0EfVz6X05xEZyFCRCTXQGqL1BWeYVKc8cOUJd40KPOSVD9hbIH+qr1ct V1CZVX9F97mR7adh4B8JWpRyP71R1QjpAEgIGOb07HtTC/n/2cXb0JlmFRJWAQq7wgQP OkJV0+A0gPVZUidtUN8tTxTltDIaXdjA3Y4rzGslD8aAvyJZ9CQntk+wDpuf9ED3nCmf 2NuCEaBj1LG1M8WtOZzxCi2IuXc6OOe9fSCdxpos7VxhXReqZK2d0QDbUm/AS2CE76Dj lA/A== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-43218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y6-20020a62f246000000b006d9f3b55cfbsi6068452pfl.97.2024.01.29.09.57.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:57:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43218-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=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-43218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D0F4FB2168B for ; Mon, 29 Jan 2024 17:44:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74AD73F9F9; Mon, 29 Jan 2024 17:42:43 +0000 (UTC) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 5503E3F9DC for ; Mon, 29 Jan 2024 17:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706550163; cv=none; b=ZAOKzeh5x8T3NQ+AEtVXjp5up3TtwRsnWbeI44WONDvcCagQt/t0S6BgfAAcn7EEOFkz19cT8vT0yeYtrkUkiXj0fzd1Tmb7X+5U0FycePk2uGy9hFX3iCRjY1mA31+PIIs5zY7/f8Zfu3ZiV9rn5XPCelYTYv8BdH0LZoTRz54= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706550163; c=relaxed/simple; bh=TosvVxwquqInZxOX0CZp6UFQe750GXHzXLT2bzJ8KRk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UfaLXQ734r5fr3vZFT9xgC5WINTgbBsl5mt5xaeax7i1F4dur8Fplunw8vXYEZIHrCqcueWwpOgTSb4oNEjD92M+HrFPfHBaEXWgBheJGoq246fELm8ccJbKNvZYNeM4bO+m4/eJ6IdCqkaX9wvpeDcEQCNdDzobikcLg1b/FF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=redhat.com; arc=none smtp.client-ip=209.85.219.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-68c420bf6f1so13665646d6.1 for ; Mon, 29 Jan 2024 09:42:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706550160; x=1707154960; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bGSfs+oLah5p8atiIFDkPtIIBxDhbFoFkuAT3N8FnRs=; b=j/MTsCC8xztFZY1QbZ8lV49hP04FJvTfiv2iX32leTTvbK6VvgfGIJWOiEquNIeFyg IivzJEJzrO11ktNfdoxd52GUQEyFjQZj7xy0k3K3khOFbZMbf3PugrnlPc5HTZhRXVnj xu3uShVf08i7gW5PyPmlNlt5+nQqwhruUpEhQwtkkB1a5JW7nvo4w3f7jYEjJLglz7aH HcLZz+f4/NUENj6DUN0f36AON41YLg98851aIRGGXtGe920q5TE6KGXpWJGDNW5YwlII AOytHeqk9hU2XdwT+W4ijdLJscW+sdAjcvDDU+/VbWJ9s4gH1lgwwYskkptDLMaowiRF 54lQ== X-Gm-Message-State: AOJu0Yy7T6RhoqvtJAVBooGN+cb4zspLaEwJUYoERHKhnu5cTSUpjp1f bzk/yJ9Lxbb6gJHkamE+OiY2s8xXr3RDDNsft4cSH1j5DqK72qQD1fzVRT2LjA== X-Received: by 2002:a05:6214:4008:b0:67f:26c9:ffdb with SMTP id kd8-20020a056214400800b0067f26c9ffdbmr6347580qvb.22.1706550160222; Mon, 29 Jan 2024 09:42:40 -0800 (PST) Received: from localhost (pool-68-160-141-91.bstnma.fios.verizon.net. [68.160.141.91]) by smtp.gmail.com with ESMTPSA id s17-20020ad44b31000000b0068c523609e6sm777249qvw.20.2024.01.29.09.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:42:39 -0800 (PST) Date: Mon, 29 Jan 2024 12:42:38 -0500 From: Mike Snitzer To: Ming Lei , Dave Chinner , Matthew Wilcox Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Don Dutile , Raghavendra K T , Alexander Viro , Christian Brauner , linux-block@vger.kernel.org Subject: Re: [RFC PATCH] mm/readahead: readahead aggressively if read drops in willneed range Message-ID: References: <20240128142522.1524741-1-ming.lei@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: On Mon, Jan 29 2024 at 12:19P -0500, Mike Snitzer wrote: > While I'm sure this legacy application would love to not have to > change its code at all, I think we can all agree that we need to just > focus on how best to advise applications that have mixed workloads > accomplish efficient mmap+read of both sequential and random. > > To that end, I heard Dave clearly suggest 2 things: > > 1) update MADV/FADV_SEQUENTIAL to set file->f_ra.ra_pages to > bdi->io_pages, not bdi->ra_pages * 2 > > 2) Have the application first issue MADV_SEQUENTIAL to convey that for > the following MADV_WILLNEED is for sequential file load (so it is > desirable to use larger ra_pages) > > This overrides the default of bdi->io_pages and _should_ provide the > required per-file duality of control for readahead, correct? I meant "This overrides the default of bdi->ra_pages ..." ;)