From patchwork Fri Aug 21 15:12:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 11729721 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF3A4138C for ; Fri, 21 Aug 2020 15:12:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 82757207C3 for ; Fri, 21 Aug 2020 15:12:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kZUnJ6jz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82757207C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C16508D0026; Fri, 21 Aug 2020 11:12:31 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B9F3F8D0022; Fri, 21 Aug 2020 11:12:31 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A68268D0026; Fri, 21 Aug 2020 11:12:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id 8DBC98D0022 for ; Fri, 21 Aug 2020 11:12:31 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 385D6180AD81A for ; Fri, 21 Aug 2020 15:12:31 +0000 (UTC) X-FDA: 77174917302.12.price73_60120db2703a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id E89E918003C18 for ; Fri, 21 Aug 2020 15:12:29 +0000 (UTC) X-Spam-Summary: 1,0,0,085d7a85f73eb487,d41d8cd98f00b204,npiggin@gmail.com,,RULES_HIT:41:355:379:541:973:988:989:1260:1311:1314:1345:1437:1515:1535:1542:1711:1730:1747:1777:1792:1801:2198:2199:2393:2559:2562:2731:3138:3139:3140:3141:3142:3354:3865:3866:3867:3868:3870:3871:4362:4605:5007:6119:6261:6653:7875:9413:10004:11026:11232:11473:11658:11914:12043:12296:12297:12438:12517:12519:12679:12895:13894:14096:14181:14394:14687:14721:21080:21444:21450:21451:21627:21666:21740:30054,0,RBL:209.85.210.196:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100;04yr5usy4b4s3b7ehru1z9pfufgr6ycd5ci5abgpdk3gfdofuwpuqaejbhb44o7.h3jp6yp863xd6hnkwqr6zxnbcibgepzwpxewhjsgdccnxa7erxyzip459fnqzpm.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: price73_60120db2703a X-Filterd-Recvd-Size: 5679 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 15:12:29 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id 17so1199030pfw.9 for ; Fri, 21 Aug 2020 08:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lRxrDToJB/xPOxG5kGdgUWQPtXDsSaGWKdRXIKBnLww=; b=kZUnJ6jz2FEkjkC4B07sDG1MjmzhjlUML84kGzNbhSDyDdfVyIkBqQ1JVaKnlcpnsW O4/rnCdzXc5wLDuh66q0rTTJxxarsRrbbSJ3CBzYgOl2Kiph/wZYJr1Qvco+GQ7avZZF Dbs74MOkriYYn3Uv1eGMGWPeNA1bNr83Aa+YHScAmKLmebvgMrUyej9FYoVnkrCPjtE3 /d9DU7qLsc96xQiWL8n/lPwiBLfzsLbk3ZLdsUeHAbC9H8xLy9KN7b5omTiIo5lCszfb 4BIvgj0FwaU6x9/I2bYSDZEgvwAguArcSIW9qjKYuZ90qn8CQH/xh3SQ44OCN04qHdb/ qz8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lRxrDToJB/xPOxG5kGdgUWQPtXDsSaGWKdRXIKBnLww=; b=Q2RyXhIe6VYqz+ZRF4xNwgnW28lA4dzlHdLRED/MKwt3XWLKV+pc/CXhZDwigo0Aag NquBxm5ITWnkPNTwGrhwjoUG1RMzeC78mR9HuSVJHdLjxQ/D8pkmpNlyNLLo8mPmQAHk wrsu+YjKz9xfhFrWObTx50vGYGXKD6Qv/JvywZz/rKwe71Cmtd08CClrGBbrDkT8HTKE UNIGB5L5J4CXOCx4nlnpffpFuy/nYmUg7XvIJ8W5whKRbRs+AVVcUI4oDTQHpVpYdFyW EB7GeFjbX/lUlvPImvhvzJ3EiIwqL7qizVga7H6iPrSpznlxyVyjBFZVHmAUWp7MvMeT VyzQ== X-Gm-Message-State: AOAM532t83th1hYFTrNt1P4THjHE1ZrWP5pJA0v/LqqD77NrW0IFRLou oy+y+kCLOtBPFgr72x0CMHbeWIGATeE= X-Google-Smtp-Source: ABdhPJxt6gfGs7RCQ4HiMUqjAvNGZuzKIyZP+qM+HUnYFTtKpiyJhyFCAA1UxFk4xgMqZ7BnAojcJw== X-Received: by 2002:aa7:8757:: with SMTP id g23mr2825194pfo.283.1598022748057; Fri, 21 Aug 2020 08:12:28 -0700 (PDT) Received: from bobo.ozlabs.ibm.com (61-68-212-105.tpgi.com.au. [61.68.212.105]) by smtp.gmail.com with ESMTPSA id s8sm3126985pfc.122.2020.08.21.08.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 08:12:27 -0700 (PDT) From: Nicholas Piggin To: linux-mm@kvack.org, Andrew Morton Cc: Nicholas Piggin , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Zefan Li , Jonathan Cameron , Christoph Hellwig , Christophe Leroy Subject: [PATCH v6 00/12] huge vmalloc mappings Date: Sat, 22 Aug 2020 01:12:04 +1000 Message-Id: <20200821151216.1005117-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: E89E918003C18 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: Thanks Christophe and Christoph for reviews. Thanks, Nick Since v5: - Split arch changes out better and make the constant folding work - Avoid most of the 80 column wrap, fix a reference to lib/ioremap.c - Fix compile error on some archs Since v4: - Fixed an off-by-page-order bug in v4 - Several minor cleanups. - Added page order to /proc/vmallocinfo - Added hugepage to alloc_large_system_hage output. - Made an architecture config option, powerpc only for now. Since v3: - Fixed an off-by-one bug in a loop - Fix !CONFIG_HAVE_ARCH_HUGE_VMAP build fail - Hopefully this time fix the arm64 vmap stack bug, thanks Jonathan Cameron for debugging the cause of this (hopefully). Since v2: - Rebased on vmalloc cleanups, split series into simpler pieces. - Fixed several compile errors and warnings - Keep the page array and accounting in small page units because struct vm_struct is an interface (this should fix x86 vmap stack debug assert). [Thanks Zefan] Nicholas Piggin (12): mm/vmalloc: fix vmalloc_to_page for huge vmap mappings mm: apply_to_pte_range warn and fail if a large pte is encountered mm/vmalloc: rename vmap_*_range vmap_pages_*_range lib/ioremap: rename ioremap_*_range to vmap_*_range mm: HUGE_VMAP arch support cleanup powerpc: inline huge vmap supported functions arm64: inline huge vmap supported functions x86: inline huge vmap supported functions mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c mm/vmalloc: add vmap_range_noflush variant mm/vmalloc: Hugepage vmalloc mappings powerpc/64s/radix: Enable huge vmalloc mappings .../admin-guide/kernel-parameters.txt | 2 + arch/Kconfig | 4 + arch/arm64/include/asm/vmalloc.h | 25 + arch/arm64/mm/mmu.c | 26 - arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/vmalloc.h | 21 + arch/powerpc/mm/book3s64/radix_pgtable.c | 21 - arch/x86/include/asm/vmalloc.h | 23 + arch/x86/mm/ioremap.c | 19 - arch/x86/mm/pgtable.c | 13 - include/linux/io.h | 9 - include/linux/vmalloc.h | 10 + init/main.c | 1 - mm/ioremap.c | 225 +-------- mm/memory.c | 60 ++- mm/page_alloc.c | 5 +- mm/vmalloc.c | 443 +++++++++++++++--- 17 files changed, 515 insertions(+), 393 deletions(-)