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=-7.5 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=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 2617BC433E0 for ; Thu, 18 Mar 2021 18:17:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AE74964F24 for ; Thu, 18 Mar 2021 18:17:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE74964F24 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 43A1F6B0078; Thu, 18 Mar 2021 14:17:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AF3D8D0001; Thu, 18 Mar 2021 14:17:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2029C6B007D; Thu, 18 Mar 2021 14:17:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 001F16B0078 for ; Thu, 18 Mar 2021 14:17:25 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B543C9091 for ; Thu, 18 Mar 2021 18:17:25 +0000 (UTC) X-FDA: 77933802450.12.44C7D9F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf13.hostedemail.com (Postfix) with ESMTP id E322DE0060EF for ; Thu, 18 Mar 2021 18:15:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616091345; 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=eWwkukZsW5LWMZHAvMffTjNcsw+o4hC1GioV1Bv4Gcc=; b=cYsBAw4oFK+Nhw0TPxo2XR3rvirHCNttLnabsjz1ueObjhB+BT10dAk8AS/k7fzqB6XNE3 hAl4qAqFqAuntA86soqyKr9NUfFVv9Ga9aXu/3G35jEUvzDckS6Q0vxG8IIHpXv13S1cxa PDmrxRv9ofJfQIGKRObpDIzECKhq95Q= 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-557-dlBss8AXNn-chxGqgT-2vw-1; Thu, 18 Mar 2021 14:15:43 -0400 X-MC-Unique: dlBss8AXNn-chxGqgT-2vw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3028010866A3; Thu, 18 Mar 2021 18:15:42 +0000 (UTC) Received: from [10.36.113.61] (ovpn-113-61.ams2.redhat.com [10.36.113.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 059365D9D0; Thu, 18 Mar 2021 18:15:34 +0000 (UTC) Subject: Re: Page zapping and page table reclaim To: Rik van Riel , Linux Memory Management List Cc: Minchan Kim , Matthew Wilcox , Michal Hocko , Andrea Arcangeli , Peter Xu References: <9d610d214ed8fcea9a236ec2fc54c39a5a841497.camel@surriel.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Thu, 18 Mar 2021 19:15:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <9d610d214ed8fcea9a236ec2fc54c39a5a841497.camel@surriel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Stat-Signature: 118fkaytt9cod6njhrpxg858ecamsyeo X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E322DE0060EF Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616091345-848501 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 18.03.21 19:03, Rik van Riel wrote: > On Thu, 2021-03-11 at 19:14 +0100, David Hildenbrand wrote: >> Hi folks, >> >> I was wondering, is there any mechanism that reclaims basically >> empty >> page tables in a running process? > > Currently we have do_munmap -> unmap_region -> free_pgtables, > which is hooked up only to sys_munmap. > > We don't seem to have an equivalent for the various MADV_ > options that lead to freed memory. > The other path I am interested in is doing an fallocate(FALLOC_FL_PUNCH_HOLE)/MADV_REMOVE on a shared file/mapping, resulting in the same situation AFAIKS. -- Thanks, David / dhildenb