Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp484167lqi; Thu, 7 Mar 2024 03:11:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXgLfhjn883XdPu8f6WgCORp3w6fyNJZe1DPTyyamg7kWnYE4bUGoxj6WoRGetqRrDw5ErIROUscpVb2ho/vbIOGcns8zOtdwvrYYWzHg== X-Google-Smtp-Source: AGHT+IGpEgGbYmFLMqucyMvvm28RItSJwY41lRZwVv45SElFEjTuxAAGOCxpsJq5zWIpiH/3u0Ya X-Received: by 2002:a05:620a:2a05:b0:787:ea8a:d081 with SMTP id o5-20020a05620a2a0500b00787ea8ad081mr1467983qkp.25.1709809901009; Thu, 07 Mar 2024 03:11:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709809900; cv=pass; d=google.com; s=arc-20160816; b=Hg7I8iKUVxFaUGO4tExfX5jJlmnJRnnR/bHfhsQgxeNqSokaFhCjU1pRk4GjrQU/DA NGhNX+Nrvy3pQHw7zwj6ZBr6fWAVhAHxYMckQvPF8T5gu8IiyPtRfdbGWoSiotKDOEjA ioRyOdpOqY1t2MAej7jKjGeoKvI1Y98P/VIjlsEbY4G4+aHVMBAAdI0h2YeKLkfhxBDj 6vtlwDNZmXZnJ6HhmikzmjllqJzXTk7Sajj6RMuhx2x8VJK4Yf/u/1SToEvsjqMcvJXK 47i5z5JjrnU6sK2onk2dmqR/Xk6rlZpHf/gHENNNYZtmsCkLf4Fm+5Xm8qLXJo8dj/TB Aesg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=thread-index:thread-topic:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject :references:in-reply-to:message-id:cc:to:from:date; bh=m8Oa2/VYa0ptS2XoYMqcLZ2FrU8+142wWfYUZUWN320=; fh=UlHZ7rYDZzaWm6tW85DAwvkwX8SGgrYrR73MJGzlWag=; b=scNNwtwhDPx/GtxDFVlzTkyS+aWXOTcbvLJpTAa5XyVAwFTseAJXQc6sEW7yUZgGl9 hgv5MXSpSUBqt4Uphn9jj9AJEWkwUbnrN+85r8P//bdvvwRJV0mOMEnt8fDuxoAjTDsh V4p/QCTF/mBsqa9NuoGJEfaRd5jW7hEaF+gBh15DGDsURtEXLqE32u8vI89/ek9FdTDf APQnWn+0r7G9IcSZ0rR9+0jcTsSiVV8SS5Y/gnU8baZY2UkFR9BpXC9/q54mhZp1isMP AHKXsG2zoMjyrjfb3IWLTE4GDcnT/DyVTNFr113PVlpkBuQfRIuOp+OWSFw0cpnIarB6 SJ0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-95386-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95386-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p7-20020a05620a22a700b0078830baaa2esi6718751qkh.572.2024.03.07.03.11.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 03:11:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95386-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-95386-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95386-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 670891C23C4E for ; Thu, 7 Mar 2024 11:11:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B0B6129A66; Thu, 7 Mar 2024 11:10:51 +0000 (UTC) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23CD612838A; Thu, 7 Mar 2024 11:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.201.40.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709809850; cv=none; b=UdOJxNodctoULMKrtZPZwGynz1W8J5WayrCmVTnR+48O8A8iyCPzXZPF/CLwRDzeKhaAOGG39yyYQMS3tu5AdYzN1ZOL6M9yxjkDm7Z9T14at4oN3IE1cKcbNHFnqrrAlj5AVkVbHrOS7I49ou8MGKl4SsuQ4inukmlBN5z7d80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709809850; c=relaxed/simple; bh=m8Oa2/VYa0ptS2XoYMqcLZ2FrU8+142wWfYUZUWN320=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=qJxsqUFBCxZa2rpMSAcqATJmnrpaLywNZnKpWw7WfmkSb1UNThOcHcd/oWje4sIavQ4OOWRAn1mE7UHGCNV/7Qgp0xeZ/o/HhuJpcOBXaNp06DusOJd3V+FVzOiG6z+CBqDF51T6tC9bnq0vs2T+YDkzTQ/XDT7br6ZpsXcrKOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at; spf=fail smtp.mailfrom=nod.at; arc=none smtp.client-ip=195.201.40.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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== ----- 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