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 X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B5E1C433E0 for ; Tue, 9 Feb 2021 16:19:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0015164EAA for ; Tue, 9 Feb 2021 16:19:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232686AbhBIQTH (ORCPT ); Tue, 9 Feb 2021 11:19:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50567 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232400AbhBIQTG (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-kselftest@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