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 AF872C48BF6 for ; Thu, 7 Mar 2024 11:10:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F5546B0156; Thu, 7 Mar 2024 06:10:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 27E166B0157; Thu, 7 Mar 2024 06:10:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 120526B0158; Thu, 7 Mar 2024 06:10:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id F00EE6B0156 for ; Thu, 7 Mar 2024 06:10:48 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D0B2C1A0635 for ; Thu, 7 Mar 2024 11:10:48 +0000 (UTC) X-FDA: 81869975376.17.C27AEAA Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by imf16.hostedemail.com (Postfix) with ESMTP id 9106218000D for ; Thu, 7 Mar 2024 11:10:46 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of richard@nod.at designates 195.201.40.130 as permitted sender) smtp.mailfrom=richard@nod.at ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709809847; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m8Oa2/VYa0ptS2XoYMqcLZ2FrU8+142wWfYUZUWN320=; b=KBY9Iiy5CetPUo0uFGgpnSLy5oXEv1E8VKsqFtv5YKJUH+iIlxbPoGVBfCodT6zutdiIqC pu/4Yr38pzakzqOufqsHdPfJWYWN2VWF6K6Tr3qXfvW1bX2iilGjC/Vqmz4XPriuPZ8jdL 3r0gqFBSgwIiZ6KcWf/olJlYbGAryL4= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf16.hostedemail.com: domain of richard@nod.at designates 195.201.40.130 as permitted sender) smtp.mailfrom=richard@nod.at ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709809847; a=rsa-sha256; cv=none; b=e8Wu1eQo9dv1Ai1Y/hy1CWTtBwxKno24Ee+x61Oin8AvveHqxfqivLJsQgNZzuf9YYizCR NZsZa5+dOdgvm49GyumUJ6TGL+tNQi+rVlN99dVeXVBiGzUaEZPIda9LYbO9LxO8njP+FF rM8iuPJFAH/gbvSAS2jeaNo/rEPOfbk= Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id A40EC644CE7E; Thu, 7 Mar 2024 12:10:44 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id bXZLWalnL1O8; Thu, 7 Mar 2024 12:10:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 09263644CE8A; Thu, 7 Mar 2024 12:10:44 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NBLkt6calHPY; Thu, 7 Mar 2024 12:10:43 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id BDCAF644CE7E; Thu, 7 Mar 2024 12:10:43 +0100 (CET) Date: Thu, 7 Mar 2024 12:10:43 +0100 (CET) From: Richard Weinberger To: David Hildenbrand Cc: linux-mm , linux-fsdevel , linux-kernel , Linux Doc Mailing List , upstream+pagemap@sigma-star.at, adobriyan@gmail.com, wangkefeng wang , ryan roberts , hughd@google.com, peterx@redhat.com, avagin@google.com, lstoakes@gmail.com, vbabka , Andrew Morton , usama anjum , Jonathan Corbet Message-ID: <1058679077.23275.1709809843605.JavaMail.zimbra@nod.at> In-Reply-To: References: <20240306232339.29659-1-richard@nod.at> Subject: Re: [PATCH 1/2] [RFC] proc: pagemap: Expose whether a PTE is writable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: proc: pagemap: Expose whether a PTE is writable Thread-Index: XSyjIW0X6vSwMkWWDv+zJYc006jxkw== X-Rspamd-Queue-Id: 9106218000D X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ks4peg56oauk1kbwe6atao43tcity99t X-HE-Tag: 1709809846-26414 X-HE-Meta: U2FsdGVkX18mjQBfBmVR2TprL7TEVYMTm+ymg7if9FdLq1hEO+sfVPNINU4kTK0Tb3l9Uxq28QLpnnMlOB9waXEKR9xuovajANQKFAmX8FdjkR37ghnr1oHrMLfk5S16fk+zkwwzxMoqmnV/W3v7GaWkirYv6dLHL8zN4Tm+yYJOEOsqU73Y8AcX05aAtyPJrpwVGSfQUwgLoMk301FCC8fkxzL9HtLEV0D2M6iEhPVsTrtwWw40luNIPpck3OUlt4LJf9HHl1xGgrKABZ8d/TYKOK4UbeepU8399UzZQq4JodJtqDIO7g10yCvtZ8u27mTklTcQY7IaSD+20os0MqEaIYU+BcEyPvXuKa+XjX7wTY67jJ+n97/Pml4dgmFHp0EhDTPl1MvsuhTt+56HnZ5oSdlV2ZVWLmcb5IPd2IujpYVaZ2hL4jWfilg5tDu7ztM2T+R0YflLh/aIcC29SOx57/kmW5xQPLvLMmWSA+iaFYdvWECqP3/CbbsC3caQt0gTztV0yo2yb6juYAaXGei05FjNCiQaF6O8GCpjKcwQGEGTL5BrYW7zbc+qWBPysMNOe9Fbrh7lrHfHEwpM6NeQ5BJh7yCtKunAj6x7tkOItDoVlQvPrYv1xDm6UKtY5hfpiU6TD0Sl4z2+ibVmh5p5yr9PknmEzaAYWotPyupLKAfazUuHnO4qBtaSkX7gGAXphNm7TzWkfO1RV1HaxsqLSwG3OXOjJWp3Pfcko6Jwb/9ub2Qi558sKk0zjfQZBsa4sGx0iAphgR9c2aBec7Tejp2yD/uQou3XKRDLMAxwjyDN3M4Mhoz+SMfNVtLrZ9dDjjHLVJg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000377, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: ----- Urspr=C3=BCngliche Mail ----- > Von: "David Hildenbrand" > But why is that required? What is the target use case? (I did not get > the cover letter in my inbox) >=20 > We're running slowly but steadily out of bits, so we better make wise > decisions. >=20 > Also, consider: Architectures where the dirty/access bit is not HW > managed could indicate "writable" here although we *will* get a page > fault to set the page dirty/accessed. I'm currently investigating why a real-time application faces unexpected page faults. Page faults are usually fatal for real-time work loads because the latency constraints are no longer met. So, I wrote a small tool to inspect the memory mappings of a process to fin= d areas which are not correctly pre-faulted. While doing so I noticed that there is currently no way to detect CoW mappings. Exposing the writable property of a PTE seemed like a good start to me. > So best this can universally do is say "this PTE currently has write > permissions". Ok. Thanks, //richard