From patchwork Tue Jun 25 10:18:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 13710837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18151C2BBCA for ; Tue, 25 Jun 2024 10:19:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A57A06B02F1; Tue, 25 Jun 2024 06:19:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 788866B02F9; Tue, 25 Jun 2024 06:19:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45A2E6B02EF; Tue, 25 Jun 2024 06:19:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7FA3D6B02EB for ; Tue, 25 Jun 2024 06:19:14 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1C32A120A59 for ; Tue, 25 Jun 2024 10:19:14 +0000 (UTC) X-FDA: 82269013428.14.6C8DA0D Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf08.hostedemail.com (Postfix) with ESMTP id CED5D160015 for ; Tue, 25 Jun 2024 10:19:11 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=07ctzSr9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=RXwN9Dc4; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=07ctzSr9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=RXwN9Dc4; spf=pass (imf08.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719310741; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=2GmFykgSglTbFtSPq+UBfA39HdENaaTIpIBIy80cduQ=; b=XaqnRWdae6r6l+M5g6rzt/xVEQMzkYM/TA7zSG/BxSQyWWb/BQbMvlbwbz/Bcf+bxiCxFF Us7HuPMTJlaAMurT74fjAyEQ++/rLd6sQiDwQ7xOUDiDo2wkkmx3zpmxoMDuhibJ068rf9 BVPS32sjS+AIMbFfCqyZ2zAdyeOhixY= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=07ctzSr9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=RXwN9Dc4; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=07ctzSr9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=RXwN9Dc4; spf=pass (imf08.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719310741; a=rsa-sha256; cv=none; b=JV5e56zUOhDZjglYGNodrk7AIv5lXIO3GT6G3vGeLRxM/cUDo1cgBxAxAqjaefsAxmKQEV ONiWMKsmK+wm2VSgOKSKWbwG3xl48JSWuvbWMtPfiq2SUjkEgWYEt/yWtJVtfdLnmNgy+S M4FXNRSNlHgdGnmd4d7FpyQyXd38k5M= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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 smtp-out2.suse.de (Postfix) with ESMTPS id 3A5691F84A; Tue, 25 Jun 2024 10:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2GmFykgSglTbFtSPq+UBfA39HdENaaTIpIBIy80cduQ=; b=07ctzSr9hK+cfIkIePnUq+aMkeUURdgZVsE5m0Y1kMK10oHQDVBnkIHGIAow6EQaNHvSVs 41EG+Cosm4Nd8BLHMoCmWANzs+QZRKrBqXTCsheNBYI+S01RCNKSYB0zKdDgTrgqSVzGmH iA4wI/LiDva/YOn3r8CIGs+t6VN9yEg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2GmFykgSglTbFtSPq+UBfA39HdENaaTIpIBIy80cduQ=; b=RXwN9Dc4bn5FW8FlLnqQiqzOT0yC9Gfcm5gN5NDb1juulC9Z69WFItYWcAb/LsGOERF4SS lACJyCIbDVvkMLAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2GmFykgSglTbFtSPq+UBfA39HdENaaTIpIBIy80cduQ=; b=07ctzSr9hK+cfIkIePnUq+aMkeUURdgZVsE5m0Y1kMK10oHQDVBnkIHGIAow6EQaNHvSVs 41EG+Cosm4Nd8BLHMoCmWANzs+QZRKrBqXTCsheNBYI+S01RCNKSYB0zKdDgTrgqSVzGmH iA4wI/LiDva/YOn3r8CIGs+t6VN9yEg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1719310750; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2GmFykgSglTbFtSPq+UBfA39HdENaaTIpIBIy80cduQ=; b=RXwN9Dc4bn5FW8FlLnqQiqzOT0yC9Gfcm5gN5NDb1juulC9Z69WFItYWcAb/LsGOERF4SS lACJyCIbDVvkMLAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2ED9113AC1; Tue, 25 Jun 2024 10:19:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 5XBHC56ZemZrWQAAD6G6ig (envelope-from ); Tue, 25 Jun 2024 10:19:10 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id C17DCA090B; Tue, 25 Jun 2024 12:19:09 +0200 (CEST) From: Jan Kara To: Cc: Andrew Morton , Matthew Wilcox , , Jan Kara Subject: [PATCH 0/10] mm: Fix various readahead quirks Date: Tue, 25 Jun 2024 12:18:50 +0200 Message-Id: <20240625100859.15507-1-jack@suse.cz> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=762; i=jack@suse.cz; h=from:subject:message-id; bh=XYChyILC+NNnBjJAGjyftxLiSQgE6IXWy3cYnE2wwts=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBmepmGibRbZQ36hUn3IdiOgehL9CXgwUz8UI9BX+ME cCNMtSSJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZnqZhgAKCRCcnaoHP2RA2fyaB/ 4mH3pD5t6p3KoivIJdND9vpf5+u3yKKci5UT1IWZCKe1+KDdGZMjWmMZJKRbF3HEYmeiX9c4QYKdc2 nsoWuIfIwCv1b4DN7qzmoOXryQ6y8QPuQyuG5JmUhLLT8Zm0kLGGbGp7+J326ZidUW3uug/tGgerAS o1V+2i6eHFseLO7zOTNZeiVFHotunUOTvHNy1tOW+/smZcgySWnkHkaAA5LewesFr3TnWTVkGvbPzi sspFIXOiA/7+brysZiXvowUqWCSxBAhbH/ArYf8EtIbZtdG1nTMz0jQIqMneMJ5zxdeoPMwmTV5f7k XQ2wQFzGOIXG+i2OVH6jBs4GSYZCm4 X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C X-Rspamd-Action: no action X-Stat-Signature: p44jt7wq79yu8jy44r5otk5987dt4umq X-Rspam-User: X-Rspamd-Queue-Id: CED5D160015 X-Rspamd-Server: rspam02 X-HE-Tag: 1719310751-207047 X-HE-Meta: U2FsdGVkX180++l/WlNPKS3mK6bCg7rLANwNRKrv6CnfENIN3svt9UThgsf52ZaCXbdDROZchpoSsWSbprzS3aOEpnRZ/U0EnH6DgneqdQgzyWdGpHrjq+SpnGzXeY4SmS5uPabsO+Adu0pBoVabbBGq4vHPyOEgIFdUJppWtviTQFht+f8Z3mVGqpJij/VywSHMM79SseV7WDLjL5jug1ra+ERu3uXHE6RwskQ0oUNKXotS0YF4rW4yPpSMXuFYUedCF72xr4m/wYx/kvb7FS8qwELHdinOmvHHq5TS1bptj3deDtcufqNxJYMFFyMMkzrfGR4pG8boSFdNJBQsFUG1YPg4O0lF56lOOBgCddh5n6/jPDoGi7CUzeF4N+AjKoel7QkqEb4oLgfP3mV4xNCQZtHCa0db4Q6wt2gbyH9VA+uxs/3SkBcTt43Vz3412P/6H7wioY8A/XZ383nIXvWJw+AMJQBfxlkItojrEhaZopdBkZbMQFWQq+ddXv5nm/lgrolTyyzpVZ8yyHRy0UsQLmwpE8L/yQ3YUVbgEMZ+Mhuo/76w7J8ZZjDsIFsCuuXy3Z7H1weqfOu4W0Zv7h5U+MrIVy2eeOqBkSpKuTl13Mf7rmL2k87SBDpmwBecBWZZ6vftMcpeKqyUWq5xib/7s8srHTNIt9ljpwPOqIOXoT1zkgGUZX6cQpTOoBV1fXoySV/fV1acKO04PYSbDQOSC8loXjMbeXbQulQ6dawDmgFpkrpuZJhpDqFduJR64HBSX3h44LBQrMNLJNfKtXutGHc34HfUlCDKKqWAH0IdjUAbAuek83smrro5mQuHJ2zCsHppJ6y53Gltr0pB62RkR36zMnte8VJQAk9s3RjA2zJPx/BngWF3nc8b1zJUoaTKkXa1I/ZsWLA1qHUXL7srQbteZ+yp176N331K/eFbboJ13w2yILfKVJqnCR0P1J+LyH4TmgPluLNgqxA IySpte3b mqpNCinsSq3hxfBI7+Nsq2t7sF3U6Y8hT+kdJL2KocuZDwlXv6exOf1tIqGSz+kUwnH7Fd1uEnf8w3j9oSZKkFW9Fr1pQ2QWPvNybaIkruVznkxGQ5/6/CGFMeMSASbkuUEhdE5s0R1INPadvjn4lJaULZUnsitRn9oqX+umfkEzYkt4FMkaCzczau7hztTPPibMo0yboNNv1Ozfs4vliPphExvxqHU58qcmwZa+2sOR0CgwrU4Q69xQtCRpWOoolN00QKzFLGO2/XnhSQasZ//NqKoDbqRcuUYVG X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hello! When we were internally testing performance of recent kernels, we have noticed quite variable performance of readahead arising from various quirks in readahead code. So I went on a cleaning spree there. This is a batch of patches resulting out of that. A quick testing in my test VM with the following fio job file: [global] direct=0 ioengine=sync invalidate=1 blocksize=4k size=10g readwrite=read [reader] numjobs=1 shows that this patch series improves the throughput from variable one in 310-340 MB/s range to rather stable one at 350 MB/s. As a side effect these cleanups also address the issue noticed by Bruz Zhang [1]. Honza [1] https://lore.kernel.org/all/20240618114941.5935-1-zhangpengpeng0808@gmail.com/ Reviewed-by: Josef Bacik Tested-by: Zhang Peng