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=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 40D1AC433DF for ; Thu, 18 Jun 2020 08:57:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EEC9F2186A for ; Thu, 18 Jun 2020 08:57:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEC9F2186A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 96CB16B0032; Thu, 18 Jun 2020 04:57:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 91C1C6B0033; Thu, 18 Jun 2020 04:57:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E3496B0036; Thu, 18 Jun 2020 04:57:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id 6022E6B0032 for ; Thu, 18 Jun 2020 04:57:12 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 227B5180AD807 for ; Thu, 18 Jun 2020 08:57:12 +0000 (UTC) X-FDA: 76941728304.02.bulb94_20073a726e0f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id EEF2E4DC1 for ; Thu, 18 Jun 2020 08:57:11 +0000 (UTC) X-HE-Tag: bulb94_20073a726e0f X-Filterd-Recvd-Size: 8254 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Thu, 18 Jun 2020 08:57:11 +0000 (UTC) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05I8XHsP166386; Thu, 18 Jun 2020 04:56:54 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31r44t239w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jun 2020 04:56:54 -0400 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05I8Xovn168995; Thu, 18 Jun 2020 04:56:53 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 31r44t2396-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jun 2020 04:56:53 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05I8tl9e022242; Thu, 18 Jun 2020 08:56:50 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma04fra.de.ibm.com with ESMTP id 31r18v04f3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jun 2020 08:56:50 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05I8tTmP62915032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Jun 2020 08:55:29 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC5ED4204C; Thu, 18 Jun 2020 08:56:46 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBBA14203F; Thu, 18 Jun 2020 08:56:43 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.204.36]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 18 Jun 2020 08:56:43 +0000 (GMT) Date: Thu, 18 Jun 2020 11:56:41 +0300 From: Mike Rapoport To: Anshuman Khandual Cc: linux-mm@kvack.org, Catalin Marinas , Will Deacon , Mark Rutland , Paul Walmsley , Palmer Dabbelt , Tony Luck , Fenghua Yu , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , David Hildenbrand , Michal Hocko , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Andrew Morton , Dan Williams , Pavel Tatashin , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 (RESEND) 0/3] arm64: Enable vmemmap mapping from device memory Message-ID: <20200618085641.GE6493@linux.ibm.com> References: <1592442930-9380-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592442930-9380-1-git-send-email-anshuman.khandual@arm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-18_04:2020-06-17,2020-06-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 lowpriorityscore=0 malwarescore=0 suspectscore=0 bulkscore=0 phishscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006180065 X-Rspamd-Queue-Id: EEF2E4DC1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Thu, Jun 18, 2020 at 06:45:27AM +0530, Anshuman Khandual wrote: > This series enables vmemmap backing memory allocation from device memory > ranges on arm64. But before that, it enables vmemmap_populate_basepages() > and vmemmap_alloc_block_buf() to accommodate struct vmem_altmap based > alocation requests. > > This series applies on 5.8-rc1. > > Pending Question: > > altmap_alloc_block_buf() does not have any other remaining users in > the tree after this change. Should it be converted into a static > function and it's declaration be dropped from the header > (include/linux/mm.h). Avoided doing so because I was not sure if there > are any off-tree users or not. Well, off-tree users probably have an active fork anyway so they could switch to vmemmap_alloc_block_buf()... Regardless, can you please update Documentation/vm/memory-model.rst to keep it in sync with the code? > Changes in V3: > > - Dropped comment from free_hotplug_page_range() per Robin > - Modified comment in unmap_hotplug_range() per Robin > - Enabled altmap support in vmemmap_alloc_block_buf() per Robin > > Changes in V2: (https://lkml.org/lkml/2020/3/4/475) > > - Rebased on latest hot-remove series (v14) adding P4D page table support > > Changes in V1: (https://lkml.org/lkml/2020/1/23/12) > > - Added an WARN_ON() in unmap_hotplug_range() when altmap is > provided without the page table backing memory being freed > > Changes in RFC V2: (https://lkml.org/lkml/2019/10/21/11) > > - Changed the commit message on 1/2 patch per Will > - Changed the commit message on 2/2 patch as well > - Rebased on arm64 memory hot remove series (v10) > > RFC V1: (https://lkml.org/lkml/2019/6/28/32) > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: Paul Walmsley > Cc: Palmer Dabbelt > Cc: Tony Luck > Cc: Fenghua Yu > Cc: Dave Hansen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: David Hildenbrand > Cc: Mike Rapoport > Cc: Michal Hocko > Cc: "Matthew Wilcox (Oracle)" > Cc: "Kirill A. Shutemov" > Cc: Andrew Morton > Cc: Dan Williams > Cc: Pavel Tatashin > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-ia64@vger.kernel.org > Cc: linux-riscv@lists.infradead.org > Cc: x86@kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > > Anshuman Khandual (3): > mm/sparsemem: Enable vmem_altmap support in vmemmap_populate_basepages() > mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf() > arm64/mm: Enable vmem_altmap support for vmemmap mappings > > arch/arm64/mm/mmu.c | 59 ++++++++++++++++++++++++++------------- > arch/ia64/mm/discontig.c | 2 +- > arch/powerpc/mm/init_64.c | 10 +++---- > arch/riscv/mm/init.c | 2 +- > arch/x86/mm/init_64.c | 12 ++++---- > include/linux/mm.h | 8 ++++-- > mm/sparse-vmemmap.c | 38 ++++++++++++++++++++----- > 7 files changed, 87 insertions(+), 44 deletions(-) > > -- > 2.20.1 > -- Sincerely yours, Mike.