Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp330606pxb; Tue, 9 Feb 2021 01:13:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNOn7zAL1CGvMppIGFrwH/G95dgLch+qSPBAKpBwelpiXzbZHS2eFDj8eG6UD6Sady/dQi X-Received: by 2002:aa7:c2c5:: with SMTP id m5mr21972304edp.250.1612861998038; Tue, 09 Feb 2021 01:13:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612861998; cv=none; d=google.com; s=arc-20160816; b=dyASmY5m99le9FaLd5cXGPL/9pHxfSzr+Sn1wjmwgZ+fxdQE9Nx77zHwN4NCn+LrZj 7dbbYh1FuWlXgHS9DDSbUds8q927Vx1+Ow+pzEArIaxjjEZN9dr84j+atnJE6gL3v4En IooE+euYZ8By/UIl8Inga9NVdw9VUZOxrJoqFSI09fJ/07sFIMuefA0cm/Qyp2u94Rok gErUayLFvTeAvBzBeUsW+Jj123U01BwKzRcYZguxP4pwPQD42MwEGp2bVcuCqcOM+Sj0 HU6Z7i4po9aGxGWg1Tar75jTvRi07oV8TMk+NOYx1+NTyzvVQ17jdkRt0kspI9NWdwV3 wTtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qKmPZ6awqg5hjlBR0sI2r8zXB8YBdpf3Fstd9lWw2l4=; b=iQi0xwjFUzO4uLHcQAcKumh3c+Cm96h8ostoKLrhOp+IDuKYwQoLx3adqDP/ws7I3x 8qhK2X2fgr8hXWmjk+ch8jntFd295nyg4eJRMfzd98JYEd52JBphHyoFeeiRN0pV5F6k qbRdgmHb7VEzY641K/Fz6XTZaEg4G39+Q8LxPwPx3rV4blUpdVlGe58irwsWtQHWQDOv aywCvJHiFvH6790EvAASdqNpoiN5OFx5Sed+3jf+5Q0cypXIX9NQTb8OYov98lP4Sks4 +SjjiZYurdYLZZ+LEC/vqBNFRbvy3qyh8F9vbca2dWXVJfY1tQN6tgqlm6YtNBh9mabi Hiug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=p4niOOYB; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si14027440edt.118.2021.02.09.01.12.53; Tue, 09 Feb 2021 01:13:18 -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=@suse.com header.s=susede1 header.b=p4niOOYB; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbhBIJHw (ORCPT + 99 others); Tue, 9 Feb 2021 04:07:52 -0500 Received: from mx2.suse.de ([195.135.220.15]:36146 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbhBIJAT (ORCPT ); Tue, 9 Feb 2021 04:00:19 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1612861172; h=from:from:reply-to: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=qKmPZ6awqg5hjlBR0sI2r8zXB8YBdpf3Fstd9lWw2l4=; b=p4niOOYBVsAxuZvLvSyfuqafhhIwTbqalQ0XUlb0o+XPLT9GQJWEuScror9bMiRAM/VDNR Gg1qoKrVPkiLaebs0ekDczrIK91xZLqc+rSpU+PO8Uxxh1llnmK79t7ldLJZVcdfnC2J7E dBwPdj8xY5v0EllSgVlDCcSTDxSJc8Y= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 14A0BAB71; Tue, 9 Feb 2021 08:59:32 +0000 (UTC) Date: Tue, 9 Feb 2021 09:59:31 +0100 From: Michal Hocko To: David Hildenbrand 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 Subject: Re: [PATCH v17 00/10] mm: introduce memfd_secret system call to create "secret" memory areas Message-ID: References: <20210208211326.GV242749@kernel.org> <1F6A73CF-158A-4261-AA6C-1F5C77F4F326@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1F6A73CF-158A-4261-AA6C-1F5C77F4F326@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 08-02-21 22:38:03, David Hildenbrand wrote: > > > Am 08.02.2021 um 22:13 schrieb Mike Rapoport : > > > > On Mon, Feb 08, 2021 at 10:27:18AM +0100, David Hildenbrand wrote: > >> On 08.02.21 09:49, Mike Rapoport wrote: > >> > >> Some questions (and request to document the answers) as we now allow to have > >> unmovable allocations all over the place and I don't see a single comment > >> regarding that in the cover letter: > >> > >> 1. How will the issue of plenty of unmovable allocations for user space be > >> tackled in the future? > >> > >> 2. How has this issue been documented? E.g., interaction with ZONE_MOVABLE > >> and CMA, alloc_conig_range()/alloc_contig_pages?. > > > > Secretmem sets the mappings gfp mask to GFP_HIGHUSER, so it does not > > allocate movable pages at the first place. > > That is not the point. Secretmem cannot go on CMA / ZONE_MOVABLE > memory and behaves like long-term pinnings in that sense. This is a > real issue when using a lot of sectremem. A lot of unevictable memory is a concern regardless of CMA/ZONE_MOVABLE. As I've said it is quite easy to land at the similar situation even with tmpfs/MAP_ANON|MAP_SHARED on swapless system. Neither of the two is really uncommon. It would be even worse that those would be allowed to consume both CMA/ZONE_MOVABLE. One has to be very careful when relying on CMA or movable zones. This is definitely worth a comment in the kernel command line parameter documentation. But this is not a new problem. -- Michal Hocko SUSE Labs