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=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 8F134C433E0 for ; Tue, 9 Feb 2021 16:17:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A2D764EAA for ; Tue, 9 Feb 2021 16:17:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A2D764EAA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 85B7F6B0005; Tue, 9 Feb 2021 11:17:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8337D6B006C; Tue, 9 Feb 2021 11:17:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FABD6B006E; Tue, 9 Feb 2021 11:17:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 5AC8F6B0005 for ; Tue, 9 Feb 2021 11:17:43 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 153681803F49B for ; Tue, 9 Feb 2021 16:17:43 +0000 (UTC) X-FDA: 77799235206.13.ship35_220eca027608 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id DE2B71813F551 for ; Tue, 9 Feb 2021 16:17:42 +0000 (UTC) X-HE-Tag: ship35_220eca027608 X-Filterd-Recvd-Size: 6085 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 16:17:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612887461; 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=Pr7mRmETPQosgzduOBZc+/626psQYjl0ekY7qCel9ZlnlzLxRONRXfhG36KG8KlwTfFo3H cs3ebL7AW0OfawTtiRks7QXgIEihZ/kSWQyBux/JY2Jj1neHRhgXCj9Yp7Z6HFjlpuIYHn 3R/fqKjLQ0XpwTe64RP4HG10qbHtV44= 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 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. >=20 > 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. >=20 I'll send a mail during the next weeks to gather current restrictions to=20 document them (and include my brain dump). We might see more excessive=20 use of ZONE_MOVABLE in the future and as history told us, of CMA as=20 well. We really should start documenting/caring. @Mike, it would be sufficient for me if one of your patches at least=20 mention the situation in the description like "Please note that secretmem currently behaves much more like long-term=20 GUP instead of mlocked memory; secretmem is unmovable memory directly=20 consumed/controlled by user space. secretmem cannot be placed onto=20 ZONE_MOVABLE/CMA. As long as there is no excessive use of secretmem (e.g., maximum of 16=20 MiB for selected processes) in combination with ZONE_MOVABLE/CMA, this=20 is barely a real issue. However, it is something to keep in mind when a=20 significant amount of system RAM might be used for secretmem. In the=20 future, we might support migration of secretmem and make it look much=20 more like mlocked memory instead." Just a suggestion. --=20 Thanks, David / dhildenb