From mboxrd@z Thu Jan 1 00:00:00 1970 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 420F4C05027 for ; Tue, 14 Feb 2023 13:06:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D84F86B0073; Tue, 14 Feb 2023 08:06:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D34EB6B0074; Tue, 14 Feb 2023 08:06:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BFC896B0075; Tue, 14 Feb 2023 08:06:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id ACF4E6B0073 for ; Tue, 14 Feb 2023 08:06:37 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6A576140C95 for ; Tue, 14 Feb 2023 13:06:37 +0000 (UTC) X-FDA: 80465921634.22.261B198 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf14.hostedemail.com (Postfix) with ESMTP id E45F4100021 for ; Tue, 14 Feb 2023 13:06:33 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=UHHpolVy; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dx5fO6yb; spf=pass (imf14.hostedemail.com: domain of jack@suse.cz designates 195.135.220.28 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=1676379994; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=t/WyduiwgFGGIrxKCM1jbAXGdU4yomecwQDiF7860eU=; b=7GU3MV8P/d0Osm55hDkUMX9ehXG7m87SF3IGGT/C6f1mGe/TLPLJfhc1+HfmlUR741bmfa p25xQt5UkOghxC/xh+mWTkYfMp7NgTZqRUH9n640lw+xBKOkTHFqZq8C0/arhgfgzlrOPg KO95h/M0isMlJC5jDqG9qGWkQLYoo90= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=UHHpolVy; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dx5fO6yb; spf=pass (imf14.hostedemail.com: domain of jack@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676379994; a=rsa-sha256; cv=none; b=8I57dZI4GCT/l600fAcvg6tCjk2hDalnbtkAJ+Sw/4rAC+eBpwNVGJw/KwBYuQ5n/1RIeL E1Qsqfhc2FhPknZxHE7kWlWuJpS7wEVYX2F4LxO/XREXLbv1QV270JXPIi0ydMBi9xOeXm /wSOvvis4c77UphxdEp8HBqeWuY0E2g= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4917021E80; Tue, 14 Feb 2023 13:06:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1676379992; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t/WyduiwgFGGIrxKCM1jbAXGdU4yomecwQDiF7860eU=; b=UHHpolVy9IvE3Tz9YeLKmE1RHCzYWxqyuoz0CkrJKlbGglNQ/LDCv2vEjCiJ6G/Po2nl50 etQ6Iqxod5yueABAorQAmkHxGkRBNI0s2u70uOamORpS70k0ZYo7mLke1Nko3vc+fR7OpS c4RxzF9waNnftoWU9eJpXbO6tcsL4fs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1676379992; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t/WyduiwgFGGIrxKCM1jbAXGdU4yomecwQDiF7860eU=; b=dx5fO6ybyiOW5awrLEN7vfe53YeG3nevLopNOqwQGa/hMyWoIPAuqKUcgPIObMcjphyGPp VsdpVhusQ8L4qXDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B3BF2138E3; Tue, 14 Feb 2023 13:06:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D9DXK1eH62M+LAAAMHmgww (envelope-from ); Tue, 14 Feb 2023 13:06:31 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 7FEE2A06D8; Tue, 14 Feb 2023 14:06:29 +0100 (CET) Date: Tue, 14 Feb 2023 14:06:29 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, John Hubbard , David Howells , David Hildenbrand Subject: Re: [PATCH 1/5] mm: Do not reclaim private data from pinned page Message-ID: <20230214130629.hcnvwpgqzhc3ulgg@quack3> References: <20230209121046.25360-1-jack@suse.cz> <20230209123206.3548-1-jack@suse.cz> <20230210112954.3yzlyi4hjgci36yn@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: a1x318nwg5opn1a1j5fidkyc14omkr7b X-Rspamd-Queue-Id: E45F4100021 X-HE-Tag: 1676379993-66140 X-HE-Meta: U2FsdGVkX1/SAdzy3hfcZc3L1r96wVEOqJq+w+ETvE5ju07/r1NRJK18fVvFNOVhpcfb/JPDGwCoRaard54TnkoXPWHw1qE7Ur4CHRUCrJr0iuLbw7ePzpJpSplURutmQ4rDPeUt1mBQ+Kz3hNnPLzZmZcIc995vsRJ8YAoDafHY3D+aD3eYzZBA+TMkY7x4NglUbyhxPBH4w5xCfuBwQVFqN1PR5o8FVAqAzcBkklQAn0DtSrWnvPU78D3IGwbUJWPEJCqebDH6ROCOAD9q07fJeg1TAfnONIz9eqEY5tuyoVeG9xuCwFOjDe97duC5kLTeZIXLliK3jb5nf/FVr4fr3KWs/MfVkMBffaiqvN11HLDy4Awp+ssIlLdSiiQwuhWm52tMVMtyIllR6BumJlpnUGWWW9t5FfUD7iVu70kW+0WVxGJBseLaCv/SoM7ChwaGgDY+pHtk8qLxAgXhFGwgm58g8xYI6Owgvvw5L5XxRQahOrfU5SJyGBvKzvFQsWtg9esF2myE+lAO6FtW270/EqzZAweTWV4rR/+25GIcNZA7A2aVzoUWiM4Wt8PK2GJeXFB+yRPGKEleKjvquEwlVYc/3Vff8ClaAl3HGYkOe6a+Sa3syOK1a+jg5ALrYF+J9kNlZg47Mu3HffbKFi4Qc5F+z0UAU9MtpDz9k815mlxaTx7Sk/psolbi/yic4udrjjNFTUn78ZWhAmvjYN7GD1e5sm/kcUn/X+92ryvOVQXJYqOWFQouyj+dPmMvEL9kAMnT9HpRMOTqDnhSISD+vb8/YSo6lxGP+aKQApKmh42cBRfHQl8Q9vVQ1rGyaIpwkWRQ3Wg67cWNOJr0m8I6nVBryy6oBlf8jxnnSkpzTmOF8i3cxlslfzq2XRb11LjI1MOtENQ1m7ANyz6Lgu3lYy0iWdMnAm8WOirUYeQRFOjqW3syZo2mlbEL6Yf901oBNlScYWbMC4UhySf xqrs6pzw RB0uGLwahFqiCEinZkKG0BPE2NSpEvIdildoZqa6u97XrggI5XZZTfvuISMZNXTi+pCrltros0bN69X5NAxSJrnmA2HPET/PsVfnU28lfvPK2WbfjjNTOEDLqrT7cXI3WNnvpIYqVJjY1q3dzkjllgEi6eOROXkERfypVqWvltDSmbb1EwjGXISOCpKUv8vt82rtNqmA896VjiryLFCAcS8yHUs8myqDffPmWduJfDK1BoWbLVOVW42fXdZl31d7kF6TIfpPZ0doOs1E= 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: On Mon 13-02-23 01:55:04, Christoph Hellwig wrote: > On Fri, Feb 10, 2023 at 12:29:54PM +0100, Jan Kara wrote: > > functionally that would make sense but as I've mentioned in my reply to you > > [1], the problem here is the performance. I've now dug out the discussion > > from 2018 where John actually tried to take pinned pages out of the LRU [2] > > and the result was 20% IOPS degradation on his NVME drive because of the > > cost of taking the LRU lock. I'm not even speaking how costly that would > > get on any heavily parallel direct IO workload on some high-iops device... > > I think we need to distinguish between short- and long terms pins. > For short term pins like direct I/O it doesn't make sense to take them > off the lru, or to do any other special action. Writeback will simplify > have to wait for the short term pin. > > Long-term pins absolutely would make sense to be taken off the LRU list. Yeah, I agree distinguishing these two would be nice as we could treat them differently then. The trouble is a bit with always-crowded struct page. But now it occurred to me that if we are going to take these long-term pinned pages out from the LRU, we could overload the space for LRU pointers with the counter (which is what I think John originally did). So yes, possibly we could track separately long-term and short-term pins. John, what do you think? Maybe time to revive your patches from 2018 in a bit different form? ;) Honza -- Jan Kara SUSE Labs, CR