From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755900AbdJPRxs (ORCPT ); Mon, 16 Oct 2017 13:53:48 -0400 Received: from resqmta-ch2-12v.sys.comcast.net ([69.252.207.44]:47106 "EHLO resqmta-ch2-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752822AbdJPRxq (ORCPT ); Mon, 16 Oct 2017 13:53:46 -0400 Date: Mon, 16 Oct 2017 12:53:41 -0500 (CDT) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Michal Hocko cc: Pavel Machek , Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Marek Szyprowski , Michal Nazarewicz , "Aneesh Kumar K . V" , Joonsoo Kim , Guy Shattah , Anshuman Khandual , Laura Abbott , Vlastimil Babka Subject: Re: [RFC PATCH 3/3] mm/map_contig: Add mmap(MAP_CONTIG) support In-Reply-To: <20171016173358.t3twty3wttbutcro@dhcp22.suse.cz> Message-ID: References: <20171013084054.me3kxhgbxzgm2lpr@dhcp22.suse.cz> <20171013152801.nbpk6nluotgbmfrs@dhcp22.suse.cz> <20171013154747.2jv7rtfqyyagiodn@dhcp22.suse.cz> <20171015065856.GC3916@xo-6d-61-c0.localdomain> <20171016081804.yiqck2g4bwlbdqi6@dhcp22.suse.cz> <20171016095447.GA4639@amd> <20171016121808.m4sq3g5nxeyxoymc@dhcp22.suse.cz> <20171016173358.t3twty3wttbutcro@dhcp22.suse.cz> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfL+i8OsGF3icwaHxEbKbNHq2TcFfsaj38Skb4uXNxZwrOuzLKOWRwFS3e0DAoICpcrv7yRE8XC+3nBM1gROMC2wVXy0kxu1P8nl1JM0Gz2DXDi1wTUUZ pNUnDFthyhACPYY5QmnkpVRks1dDaA+7eUlZ4si7CNOjES4AiBbfSAyG3p7Q1mmJKs3Ah5hVIBfGRmtR5kzTUqAhmdh0Ga/4gD8C3/yjotzsoF/sl5DV5Uv6 AK+gLq0nEXooDp/sEw96l3R867cFnZkBq6cxli0/yef7903L9DZf9GkW1Rbkb7eLuCjO5Q1M6NZ5GeZLbYUi+5MX8IC2IgYh3y5E2RPkFiNyWmkRyFKKjqDI IfGj0pRxvqNLepBDOfWs12MSq2EH6OztRuWKWR+9HF4euab8VbF9jnEpgk4SCYbgusViu2yUaMHVrozX+oZ/3b9j4rZg4iIBSyhqL1aLzXltrR6MVIwgm+4B 2DIdFwqbG9sChLDM1j8mu3/UTSFg9H9HW44y2/Q08QI7N+lgV2QLSNMrePwN/sVW+4Gdp/MslYU3N/wtuHJpun3XvzgbvhdUeSQvuiFIz5ftn27ykE1R8PSS qhA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Oct 2017, Michal Hocko wrote: > On Mon 16-10-17 11:02:24, Cristopher Lameter wrote: > > On Mon, 16 Oct 2017, Michal Hocko wrote: > > > > > > So I mmap(MAP_CONTIG) 1GB working of working memory, prefer some data > > > > structures there, maybe recieve from network, then decide to write > > > > some and not write some other. > > > > > > Why would you want this? > > > > Because we are receiving a 1GB block of data and then wan to write it to > > disk. Maybe we want to modify things a bit and may not write all that we > > received. > > And why do you need that in a single contiguous numbers? If performance, > do you have any numbers that would clearly tell the difference? Again we have that in the presentation. Why keep asking the same question if you already have the answer multiple times? 1G of data requires 250000 page structs to handle if the memory is not contiguous. This is more than most controllers can support and thus the overhead will dominate I/O. Also the scatter gather lists will cover lots of linked 4k pages even to manage. And in practice we already have multiple gigabytes per requests which makes it even more severe. You cannot do a "cp" operation anymore. Instead you need to have special code that allocates huge pages, does direct I/O etc etc,