Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1104734pxb; Tue, 9 Feb 2021 23:27:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxa1utNC9Bchj5Ltf3NabMNmIKk3R64wDO8CKTitDB1R9NkaiFFJqgwImAJwDY89nAJHZ8a X-Received: by 2002:aa7:c0cd:: with SMTP id j13mr1882287edp.319.1612942068512; Tue, 09 Feb 2021 23:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612942068; cv=none; d=google.com; s=arc-20160816; b=OHX2nWtllWFEnn7vV0de+zWgR8+oc4E9uAHuqDlVcC8FPu/teduQmPUAA2dwHbvUlV xinHKD5/z8DuBQXi6X78lLkqQ5+ItLckqF8mIGooMtCjqLHW/ON85ZMQJlCIK5Lib0r7 msJw6mCXh5DI+heaDKsqLF7fP6xLX1f6pX5dYixRlmMUFmuZKkF7mOmOoQ0gAWGgfNRL i519nSltKlFabOnjuYMdl7nOfArZoRXyaf9r61B9D1Zk+KqgTePmB8Oif2fGRLGVD/Xy gB2hczbfLEkfMJOByFHpOabo5ahry3zIRGAY2JoMPaQ0u/bL+ugsyjHYJI8kDkC8isCQ JGGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject :organization:from:references:cc:to:dkim-signature; bh=rPEBUfuoE8xnXkHqh37MN3V58bCQtUE2J2aM+0+7Hhg=; b=H2kI4wp/ixQu7T4rM0yob4xNw4wUFy4pD5ghvnr6tN/9z2isO3R+sofPuTE93Jq+Pf URmPBlcg6acaRIZ70XnZRcsprZxpzSwJeuPdHWYYtG6etxJMg1Z5n7YAU9T2EhLuJ63Y ZMEaw3n7hmrtHidj6hDiHa0hSV3eBsWSpuZGftfFyOER1vdu9WR8YzgocyZ7nEoenEzf IqZY7AJ6EZrU3AZ2RcTs7MAPAjY2ggMYOyiTluX0QGgwf2FWu43OX6NvyPjYvaOdj8MO SPFaEhOsKfs24k53VRwLTFRBB4LWjvUaYt18Qu0gLTFlf6Bli67HmEtY+Dhb8cOp60aw m9qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GO6YGVp1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cn3si1015346edb.69.2021.02.09.23.27.25; Tue, 09 Feb 2021 23:27:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GO6YGVp1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232756AbhBIQTH (ORCPT + 99 others); Tue, 9 Feb 2021 11:19:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:48542 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231249AbhBIQTG (ORCPT ); Tue, 9 Feb 2021 11:19:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612887460; h=from:from: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=rPEBUfuoE8xnXkHqh37MN3V58bCQtUE2J2aM+0+7Hhg=; b=GO6YGVp19NtK1N7dVAYyLwM5lLtnOzWM11AF3TGBrqo9hoF8POgf1w4xEzFgWMM6R5ysae Bf5gs34GfHPGvo7B7yhyyWfXS0vRcXVdV/C4XRSmxTaGgn6+eCxIPY3sWRf3MfXhZvJGIX szQoOLLC62e0QwsiRiZm70o/7QLP2/k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-279-uL8BkgqBNoSU9TSinWcnBQ-1; Tue, 09 Feb 2021 11:17:37 -0500 X-MC-Unique: uL8BkgqBNoSU9TSinWcnBQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9332C801979; Tue, 9 Feb 2021 16:17:31 +0000 (UTC) Received: from [10.36.113.141] (ovpn-113-141.ams2.redhat.com [10.36.113.141]) by smtp.corp.redhat.com (Postfix) with ESMTP id D16AE60BD9; Tue, 9 Feb 2021 16:17:23 +0000 (UTC) To: Michal Hocko Cc: Mike Rapoport , Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org References: <20210208211326.GV242749@kernel.org> <1F6A73CF-158A-4261-AA6C-1F5C77F4F326@redhat.com> <662b5871-b461-0896-697f-5e903c23d7b9@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Subject: Re: [PATCH v17 00/10] mm: introduce memfd_secret system call to create "secret" memory areas Message-ID: <8cbfe2c3-cfc6-72e0-bab1-852f80e20684@redhat.com> Date: Tue, 9 Feb 2021 17:17:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.02.21 14:25, Michal Hocko wrote: > On Tue 09-02-21 11:23:35, David Hildenbrand wrote: > [...] >> I am constantly trying to fight for making more stuff MOVABLE instead of >> going into the other direction (e.g., because it's easier to implement, >> which feels like the wrong direction). >> >> Maybe I am the only person that really cares about ZONE_MOVABLE these days >> :) I can't stop such new stuff from popping up, so at least I want it to be >> documented. > > MOVABLE zone is certainly an important thing to keep working. And there > is still quite a lot of work on the way. But as I've said this is more > of a outlier than a norm. On the other hand movable zone is kinda hard > requirement for a lot of application and it is to be expected that > many features will be less than 100% compatible. Some usecases even > impossible. That's why I am arguing that we should have a central > document where the movable zone is documented with all the potential > problems we have encountered over time and explicitly state which > features are fully/partially incompatible. > I'll send a mail during the next weeks to gather current restrictions to document them (and include my brain dump). We might see more excessive use of ZONE_MOVABLE in the future and as history told us, of CMA as well. We really should start documenting/caring. @Mike, it would be sufficient for me if one of your patches at least mention the situation in the description like "Please note that secretmem currently behaves much more like long-term GUP instead of mlocked memory; secretmem is unmovable memory directly consumed/controlled by user space. secretmem cannot be placed onto ZONE_MOVABLE/CMA. As long as there is no excessive use of secretmem (e.g., maximum of 16 MiB for selected processes) in combination with ZONE_MOVABLE/CMA, this is barely a real issue. However, it is something to keep in mind when a significant amount of system RAM might be used for secretmem. In the future, we might support migration of secretmem and make it look much more like mlocked memory instead." Just a suggestion. -- Thanks, David / dhildenb