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=-11.7 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 60228C4338F for ; Mon, 16 Aug 2021 14:33:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0AF4760F39 for ; Mon, 16 Aug 2021 14:33:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0AF4760F39 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9AEF38D0002; Mon, 16 Aug 2021 10:33:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 95F7C8D0001; Mon, 16 Aug 2021 10:33:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 826CD8D0002; Mon, 16 Aug 2021 10:33:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id 661F48D0001 for ; Mon, 16 Aug 2021 10:33:16 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0EB0121244 for ; Mon, 16 Aug 2021 14:33:16 +0000 (UTC) X-FDA: 78481186392.37.C44FD0C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf23.hostedemail.com (Postfix) with ESMTP id B08F090066BA for ; Mon, 16 Aug 2021 14:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629124395; 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=s0HlfQDZT3zdpybiMLoLwjOV9/aqL+zi+Rs7ejBw+yM=; b=DxEhuTEYMCO9cO3HDsgvdxm+LyEkkZdj2v7V9BLvGkmSXXaCvILCiLpzrT+GfWIh4BAu9S cI7ARdykHrX1+l1MTr9V43kif7Ssy4Lr1uFCp0VryORck92Cfhoepqc9w5J3XBmp9agVGA 6LiFc/FzNh901QX61QLD+41R/dArN4A= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-6OulnKTgNQickZr15xlILw-1; Mon, 16 Aug 2021 10:33:11 -0400 X-MC-Unique: 6OulnKTgNQickZr15xlILw-1 Received: by mail-wr1-f69.google.com with SMTP id n18-20020adfe792000000b00156ae576abdso1859788wrm.9 for ; Mon, 16 Aug 2021 07:33:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=s0HlfQDZT3zdpybiMLoLwjOV9/aqL+zi+Rs7ejBw+yM=; b=KPd8sUe/dMeuDWVwqJ5O4y8j0htdNL2q1Z7FrlgNrQ6biK/KJZ/X3rlb6youAwc15f 8KugwNHt7ILxt/0leBXZEXX/I58/qROfRnjJs1DrCXadhqqDgYYl/fbiaZDtngmJsr7t M4qB5UAEUSMmf9Btpr7d8hiaSZFM3LkatS2uSEVzp4i/Od1S4OQYtB9OF2fspYkgYADc PNHFWyPLuwgfur/W2SWyG68f8Izkf0GldTAPjlsrRcusbHeGq0OK7NzIQlrgMY8y4SQF M76j6vP+i6bWRzwNlG7W8Pu1eAJCgcDJgBXwUC9M5BCY8RZJYtlnhs3lsD/Hk+a17KVX 4GYQ== X-Gm-Message-State: AOAM530xi5A+/j7fXFnM/dYRS+og0bF+OrzCVtJ0mKIGsS2wmlNAOrAZ qXgMmJHjvxl1zKhvVj99Ne0uliStrqRGAi7hzqFU+P6S3K+R3AhDoIKMqwfPajIzX0dA1PznoFf lW9RySLyuQl0= X-Received: by 2002:a05:600c:2297:: with SMTP id 23mr15814194wmf.64.1629124390654; Mon, 16 Aug 2021 07:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1nlhS40F7oJL4sXwvMcpvPWdBw39MMkTdr4yytD4CKAdbIbkWVIxnDhGxRopGmsKiE7hCZg== X-Received: by 2002:a05:600c:2297:: with SMTP id 23mr15814174wmf.64.1629124390440; Mon, 16 Aug 2021 07:33:10 -0700 (PDT) Received: from [192.168.3.132] (p5b0c67f1.dip0.t-ipconnect.de. [91.12.103.241]) by smtp.gmail.com with ESMTPSA id c190sm10547273wma.21.2021.08.16.07.33.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Aug 2021 07:33:10 -0700 (PDT) Subject: Re: [RFC PATCH 0/5] madvise MADV_DOEXEC To: Matthew Wilcox Cc: Khalid Aziz , "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" , Steven Sistare , Anthony Yznaga , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "Gonglei (Arei)" References: <55720e1b39cff0a0f882d8610e7906dc80ea0a01.camel@oracle.com> <88884f55-4991-11a9-d330-5d1ed9d5e688@redhat.com> <40bad572-501d-e4cf-80e3-9a8daa98dc7e@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <3ce1f52f-d84d-49ba-c027-058266e16d81@redhat.com> Date: Mon, 16 Aug 2021 16:33:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: 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 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DxEhuTEY; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf23.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Stat-Signature: m347ewqksmbdreye48xaftyyedb8o9eb X-Rspamd-Queue-Id: B08F090066BA X-Rspamd-Server: rspam05 X-HE-Tag: 1629124395-612963 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 16.08.21 16:27, Matthew Wilcox wrote: > On Mon, Aug 16, 2021 at 04:10:28PM +0200, David Hildenbrand wrote: >>>>> Until recently, the CPUs only having 4 1GB TLB entries. I'm sure we >>>>> still have customers using that generation of CPUs. 2MB pages perform >>>>> better than 1GB pages on the previous generation of hardware, and I >>>>> haven't seen numbers for the next generation yet. >>>> >>>> I read that somewhere else before, yet we have heavy 1 GiB page users, >>>> especially in the context of VMs and DPDK. >>> >>> I wonder if those users actually benchmarked. Or whether the memory >>> savings worked out so well for them that the loss of TLB performance >>> didn't matter. >> >> These applications are extremely performance sensitive (i.e., RT workloads), > > "real time does not mean real fast". it means predictable latency. I know, but that doesn't explain why you would use 2 MB vs 1 GiB. (most of these applications want also a low predictable latency) > >>>> I will rephrase my previous statement "hugetlbfs just doesn't raise these >>>> problems because we are special casing it all over the place already". For >>>> example, not allowing to swap such pages. Disallowing MADV_DONTNEED. Special >>>> hugetlbfs locking. >>> >>> Sure, that's why I want to drag this feature out of "oh this is a >>> hugetlb special case" and into "this is something Linux supports". >> >> I would have understood the move to optimize SHMEM internally - similar to >> how we seem to optimize hugetlbfs SHMEM right now internally. (although >> sharing page tables for shmem can still be quite tricky) >> >> I did not follow why we have to play games with MAP_PRIVATE, and having >> private anonymous pages shared between processes that don't COW, introducing >> new syscalls etc. > > It's not about SHMEM, it's about file-backed pages on regular > filesystems. I don't want to have XFS, ext4 and btrfs all with their > own implementations of ARCH_WANT_HUGE_PMD_SHARE. Let me ask this way: why do we have to play such games with MAP_PRIVATE? -- Thanks, David / dhildenb