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 E4351C433EF for ; Thu, 6 Jan 2022 00:34:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 50F9E6B0088; Wed, 5 Jan 2022 19:34:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 49AC26B0089; Wed, 5 Jan 2022 19:34:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35EAA6B008A; Wed, 5 Jan 2022 19:34:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id 230B06B0088 for ; Wed, 5 Jan 2022 19:34:59 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D8B978249980 for ; Thu, 6 Jan 2022 00:34:58 +0000 (UTC) X-FDA: 78997992276.31.38E4329 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf20.hostedemail.com (Postfix) with ESMTP id D16EA1C0005 for ; Thu, 6 Jan 2022 00:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=j/ws0vzEJU2OjIO2f4yPLYRE9EsfYCGGlr1dlofwid0=; b=WqmJgr7vh6/m3duiLD0QlIJcfx BReuyQMzWfqx4bZ1MvEbYSw4qsz3R3AdVR4tH7ynDdYZEBx67mvhlw3Z/Jt3pCfSnk8iu76mQh3Jj 4IeLMLL0QPENnL0fCItHheCzvkNTtC50jJTy6bYesQnYg3KhG3J9lKNuRQ2338cE/zh13lP98mYDs 9txFfTWwJ7v5tq+K2pW45yAGVDds14wNwog40KxRu+aIvkMAfA1HuyiLi39tp63XVZoi5VHX+ZHQw GfkGeBNaAXrIr8sCCzS9N+vuSkvyfrmzKnFAZoyG/7+r6VnvdykO867vy7akyadrLcAC5ZhKwr0JW m8k3rEzg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5Gk3-00F1KT-28; Thu, 06 Jan 2022 00:34:55 +0000 Date: Thu, 6 Jan 2022 00:34:55 +0000 From: Matthew Wilcox To: John Hubbard Cc: linux-mm@kvack.org, Andrew Morton Subject: Re: [PATCH 16/17] mm: Add isolate_lru_folio() Message-ID: References: <20220102215729.2943705-1-willy@infradead.org> <20220102215729.2943705-17-willy@infradead.org> <1f3aaaca-052b-704b-aa72-5f19cf8038fa@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f3aaaca-052b-704b-aa72-5f19cf8038fa@nvidia.com> X-Stat-Signature: 8axse9ihps8inyqni8fxu7mey8jz3oxn X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D16EA1C0005 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=WqmJgr7v; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1641429287-206019 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 Wed, Jan 05, 2022 at 12:44:38AM -0800, John Hubbard wrote: > On 1/2/22 13:57, Matthew Wilcox (Oracle) wrote: > > +int isolate_lru_page(struct page *page) > > +{ > > + if (WARN_RATELIMIT(PageTail(page), "trying to isolate tail page")) > > + return -EBUSY; > > + return isolate_lru_folio((struct folio *)page); > > This cast is not great to have, but it is correct, given the above > constraints about tail pages...and I expect this sort of thing is > temporary, anyway? We could call page_folio() here, but we already know the answer. The whole of folio-compat.c is temporary. Any time I have the luxury of boredom, grepping for any of the functions in folio-compat will show something that needs to be converted to use folios.