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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 6032BCA9EC0 for ; Mon, 28 Oct 2019 13:55:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D7C2208C0 for ; Mon, 28 Oct 2019 13:55:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mMXIKL2S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389662AbfJ1Nzm (ORCPT ); Mon, 28 Oct 2019 09:55:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55328 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727567AbfJ1Nzm (ORCPT ); Mon, 28 Oct 2019 09:55:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GeTgSWc782B9W4ttmjLGz4tgdC/DzGai4EkjN8ttTKc=; b=mMXIKL2SEtnqYcFTQBFfETqhZ Tik560Qg9n6orWmQPYldLjhvMjniKjLbno+NwSEb9TYeRNIWNXJD/1bMh11f8hnaF+RgyC001i3d3 ZJRxqy5yl68i/gCeXxlX55eHIydz4e/ikFkQdUpIaqL4bN90K2MvMKBhoOU5LDHogJz5Otc/URQfG 7zZ08LN4Q54Wcvo9ckkTInlSlsnCYlAXUovXdCMYNAwAikOp2lUvONs7HCNQjR01nvvlltaScYM6t LoWnXVA4shjcPXbGcKOaCkfzLwdTR5rYN+qc/uVcQ5uLMEI9jkyEMfBdPzJILxRtEFzusVyV4+7PT Pb4rM4lBQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iP5US-00055y-Io; Mon, 28 Oct 2019 13:55:24 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 4CFBE3002B0; Mon, 28 Oct 2019 14:54:21 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 86173200DCF2A; Mon, 28 Oct 2019 14:55:21 +0100 (CET) Date: Mon, 28 Oct 2019 14:55:21 +0100 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Mike Rapoport , linux-kernel@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Dave Hansen , James Bottomley , Steven Rostedt , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-api@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, Mike Rapoport Subject: Re: [PATCH RFC] mm: add MAP_EXCLUSIVE to create exclusive user mappings Message-ID: <20191028135521.GB4097@hirez.programming.kicks-ass.net> References: <1572171452-7958-1-git-send-email-rppt@kernel.org> <1572171452-7958-2-git-send-email-rppt@kernel.org> <20191028123124.ogkk5ogjlamvwc2s@box> <20191028130018.GA7192@rapoport-lnx> <20191028131623.zwuwguhm4v4s5imh@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191028131623.zwuwguhm4v4s5imh@box> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 28, 2019 at 04:16:23PM +0300, Kirill A. Shutemov wrote: > I think active use of this feature will lead to performance degradation of > the system with time. > > Setting a single 4k page non-present in the direct mapping will require > splitting 2M or 1G page we usually map direct mapping with. And it's one > way road. We don't have any mechanism to map the memory with huge page > again after the application has freed the page. Right, we recently had a 'bug' where ftrace triggered something like this and facebook ran into it as a performance regression. So yes, this is a real concern.