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 8CF32EED61E for ; Fri, 15 Sep 2023 18:18:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 102556B039F; Fri, 15 Sep 2023 14:18:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B2446B03A0; Fri, 15 Sep 2023 14:18:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE3E36B03A1; Fri, 15 Sep 2023 14:17:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DFCC06B039F for ; Fri, 15 Sep 2023 14:17:59 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id AAAC4A0E36 for ; Fri, 15 Sep 2023 18:17:59 +0000 (UTC) X-FDA: 81239640678.22.D6BE85A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf13.hostedemail.com (Postfix) with ESMTP id 2FF882002A for ; Fri, 15 Sep 2023 18:17:55 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="kXs/rKPp"; spf=none (imf13.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694801877; a=rsa-sha256; cv=none; b=c89Vi79iq3PD5V5yoZ2XsJ8ivPctQ/X7AeQYgAZljVuJIJu79t+TrrF9HU3f8VTGDPB1r+ Ah27PQW0zKM6ND4AtxZoiJAw0hq6wqdr2Qim0Hqi/brMQwOGg0Qx9WZS/SoTp/4g+JWg3N +nhkObZuW5+Eo4LWMREPtpUMZe49WMk= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="kXs/rKPp"; spf=none (imf13.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694801877; 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=IZ/9ERMD1BXqY95VFvXjlfOuZqoMJEOwgTSIpzzRviw=; b=KQx3yAwsYztl91blLU66n7pGvfItyTRGStQfvMhFS3dEliS/9kbCVVgPc3TDuKx8LSrXDV g1aclOkkqGLLuqSSeeE0zluWqtJ8JNLbu3C6OvGG/25lzm7eKwTyr4Jv21xRp5k9W78q0t AhTfIzqOYggFzvzTbCIEEDmt2w7Wj3M= 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=IZ/9ERMD1BXqY95VFvXjlfOuZqoMJEOwgTSIpzzRviw=; b=kXs/rKPpldhZt2Fy5p1oCe7PlF l/MgRT9cyliL8/TeECOPaIxyP9fFf4AGuQhw4Jp/bInA/rIaaZAa/uhdNc0gkBVpEVVsypd8ljkeo TR0z3xBskjfPSDiZzVsuBsAoxFiVdTk8nqU/Dq76azj5ikZdOe3sqF1wtjK+JrWI9elDIRy8aQMcn 2XIOrnuP/MbNL1zopokoVyrw3HHMUoi2aPLl+BkfATkgtW8uzapQd3BLNSE55LoAWYKnblUTsIafk 3cGFF8kYoaL6rEVWF3W7qLoNHK9yvzBv08ydcHs2lq4f9+Xmh0hRsPtlIdk14hrrykDXIXNRLZw6k LC57XZBg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qhDO3-00BGn6-Hc; Fri, 15 Sep 2023 18:17:51 +0000 Date: Fri, 15 Sep 2023 19:17:51 +0100 From: Matthew Wilcox To: Claudio Imbrenda Cc: Andrew Morton , linux-mm@kvack.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH 0/3] Use arch_make_folio_accessible() everywhere Message-ID: References: <20230915172829.2632994-1-willy@infradead.org> <20230915195450.1fd35f48@p-imbrenda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915195450.1fd35f48@p-imbrenda> X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 2FF882002A X-Stat-Signature: bkn8xrf1epdc9fwx6ix37ei3zg79ewab X-Rspam-User: X-HE-Tag: 1694801875-14727 X-HE-Meta: U2FsdGVkX1/DEt7tZq6xFRNSnho8M0hi28ZlTy52EB7fVfb+PWFnRykPYvpGBcHhQXIbN0oLasHXeFoFZ4BOcXkXURHTbg8dwkTOECWYl7G//xZUMDMx3avUEc1GygyTF5GlrZYJDp47Ykp91J2FWzY2JlJc0jDNJMBiYfdHc5HeWFXMTAA0Y2+JIKRJDyapAmNcgoT8DkBcEMr75NwFp/bksQ3ezsX4J6Pk6KT3RFRXMeuTFFPDuofeirpf2hujcezHEwodi6gcuOHOrvqQT1KYKSyIHQnbM9+q8iHLh+rQNb59upqrjf9cmbT9E4YWr3+j19m0Zuwka6e0cM9fk9ZtUe3jqFrG6LMM+pYcbLSwltEwQa4DMiLjLNgBEcVZcLhi3ZEjxqmAx11Q55BpOHPJVq0yP0umwzZo/+f2RUAi+thMtJDMLFrsQrjgfG/CzdiTjNtRK4mAN8ySV8Jv5be+71GA6a76D8I4xULOOwgF/OAZe7iL9nrT7ItN8cm2M/swyw3Z6g8ppUDcjqCk7WyRTKBTozMUKyuHgdBIx5RFlDzelFmmZCmknnfveNTw12rR8pHvJScLm12bxuNF2DOD34kG4Usd3MeWZ0W+IXqK76RB0f/A8PmiJBr4qk5ewqPF3fgD25fSSLiyLQf/DhhGIB/JwXnF24HYcEb58zN55sDFFww86PsEkbeAlTIRd/+J5irKTo5yU+hZBhOZAkDzMkPjbZWdVWtR4bVVm4rGCMxg6jxMaXki3KB9Q8LZEDxOyNnhSnrllIPnB+Cxnmmz6V2aFt75BDiWeyyy0TGIdcBLMZhp6ogtrvbNYeJCmwTYr2/KflLVqHHPD9xb/sZfJ/lFjo9FqlGw3M9Lg47MYH3kaJ6oEH7r1fkyCnegf2uOj1KRQ+MLqYXxuwMke8oAzmtOuaUNquGhPm1KDwMMFpDWjoBA4iXGHDtucy6YMoOgiNKwNQ2Wa4Gg8WG aJGbWCDx odmqZeVxq9q+1zhhe+Hc73A4G8u8TqdYvEURGYtEsD8skWcuNI2vpg4P/oSei1sxN6Jn3YBtRZ906hiD0LkxmMEOAfYmdt+qvmy/fafq6UgvEqK9/MOd3fYGdGgYeGBX9hjciQxGLYnGtSY3d7w+S+S3yVZ2ZtwrcGSJRWndJlzlMwIq2uRhpAHTtTODGpvyEdxpJV8d6LE8pRDl6w+GhdiFLMyWtjZafASNgAc3rcosrLuHT93z1HopsPw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000484, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 15, 2023 at 07:54:50PM +0200, Claudio Imbrenda wrote: > On Fri, 15 Sep 2023 18:28:25 +0100 > "Matthew Wilcox (Oracle)" wrote: > > > We introduced arch_make_folio_accessible() a couple of years > > ago, and it's in use in the page writeback path. GUP still uses > > arch_make_page_accessible(), which means that we can succeed in making > > a single page of a folio accessible, then fail to make the rest of the > > folio accessible when it comes time to do writeback and it's too late > > to do anything about it. I'm not sure how much of a real problem this is. > > > > Switching everything around to arch_make_folio_accessible() also lets > > us switch the page flag to be per-folio instead of per-page, which is > > a good step towards dynamically allocated folios. > > if I understand correctly, this will as a matter of fact move the > security property from pages to folios. Correct. > this means that trying to access a page will (try to) make the whole > folio accessible, even though that might be counterproductive.... > > and there is no way to simply split a folio > > I don't like this As I said in the cover letter, we already make the entire folio accessible in the writeback path. I suppose if you never write the folio back, this is new ... Anyway, looking forward to a more substantial discussion on Monday.