From patchwork Fri Nov 8 00:08:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toshiki Fukasawa X-Patchwork-Id: 11233917 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 E06041390 for ; Fri, 8 Nov 2019 00:13:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A73B521D6C for ; Fri, 8 Nov 2019 00:13:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A73B521D6C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vx.jp.nec.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D6B6D6B0005; Thu, 7 Nov 2019 19:13:38 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D1CAB6B0006; Thu, 7 Nov 2019 19:13:38 -0500 (EST) 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 C333A6B0007; Thu, 7 Nov 2019 19:13:38 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id AD7B16B0005 for ; Thu, 7 Nov 2019 19:13:38 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 655774DA6 for ; Fri, 8 Nov 2019 00:13:38 +0000 (UTC) X-FDA: 76131186516.30.bomb82_28520f08c81e X-Spam-Summary: 2,0,0,d4c045e9ecef8174,d41d8cd98f00b204,t-fukasawa@vx.jp.nec.com,::dan.j.williams@intel.com:linux-kernel@vger.kernel.org:akpm@linux-foundation.org:mhocko@kernel.org:adobriyan@gmail.com:hch@lst.de:longman@redhat.com:sfr@canb.auug.org.au:mst@redhat.com:cai@lca.pw:n-horiguchi@ah.jp.nec.com:j-nomura@ce.jp.nec.com,RULES_HIT:10:41:69:355:379:582:800:960:973:988:989:1152:1260:1261:1277:1311:1313:1314:1345:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2901:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3871:3874:4250:4321:4605:5007:6119:6120:6261:6611:6742:7901:7903:10004:10399:10400:11026:11658:11914:12043:12291:12295:12296:12297:12438:12517:12519:12555:12679:12683:12740:12895:13069:13311:13357:14096:14097:14181:14394:14721:21080:21365:21451:21627:30054:30064:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMA RY:none X-HE-Tag: bomb82_28520f08c81e X-Filterd-Recvd-Size: 3442 Received: from tyo161.gate.nec.co.jp (tyo161.gate.nec.co.jp [114.179.232.161]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 00:13:36 +0000 (UTC) Received: from mailgate02.nec.co.jp ([114.179.233.122]) by tyo161.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id xA80DOxs031459 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 8 Nov 2019 09:13:24 +0900 Received: from mailsv01.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate02.nec.co.jp (8.15.1/8.15.1) with ESMTP id xA80DOoY004514; Fri, 8 Nov 2019 09:13:24 +0900 Received: from mail01b.kamome.nec.co.jp (mail01b.kamome.nec.co.jp [10.25.43.2]) by mailsv01.nec.co.jp (8.15.1/8.15.1) with ESMTP id xA80CqkT012936; Fri, 8 Nov 2019 09:13:24 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.152] [10.38.151.152]) by mail01b.kamome.nec.co.jp with ESMTP id BT-MMP-10172961; Fri, 8 Nov 2019 09:08:04 +0900 Received: from BPXM20GP.gisp.nec.co.jp ([10.38.151.212]) by BPXC24GP.gisp.nec.co.jp ([10.38.151.152]) with mapi id 14.03.0439.000; Fri, 8 Nov 2019 09:08:03 +0900 From: Toshiki Fukasawa To: "linux-mm@kvack.org" , "dan.j.williams@intel.com" CC: "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" , "mhocko@kernel.org" , "adobriyan@gmail.com" , "hch@lst.de" , "longman@redhat.com" , "sfr@canb.auug.org.au" , "mst@redhat.com" , "cai@lca.pw" , Naoya Horiguchi , Junichi Nomura Subject: [PATCH 0/3] make pfn walker support ZONE_DEVICE Thread-Topic: [PATCH 0/3] make pfn walker support ZONE_DEVICE Thread-Index: AQHVlciWlfuQn46br0aHiPqwVpeT6w== Date: Fri, 8 Nov 2019 00:08:03 +0000 Message-ID: <20191108000855.25209-1-t-fukasawa@vx.jp.nec.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.135] MIME-Version: 1.0 X-TM-AS-MML: disable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patch set tries to make pfn walker support ZONE_DEVICE. This idea is from the TODO in below patch: commit aad5f69bc161af489dbb5934868bd347282f0764 Author: David Hildenbrand Date: Fri Oct 18 20:19:20 2019 -0700 fs/proc/page.c: don't access uninitialized memmaps in fs/proc/page.c pfn walker's ZONE_DEVICE support requires capability to identify that a memmap has been initialized. The uninitialized cases are as follows: a) pages reserved for ZONE_DEVICE driver b) pages currently initializing This patch set solves both of them. Toshiki Fukasawa (3): procfs: refactor kpage_*_read() in fs/proc/page.c mm: Introduce subsection_dev_map mm: make pfn walker support ZONE_DEVICE fs/proc/page.c | 155 ++++++++++++++++++++--------------------------- include/linux/memremap.h | 6 ++ include/linux/mmzone.h | 19 ++++++ mm/memremap.c | 31 ++++++++++ mm/sparse.c | 32 ++++++++++ 5 files changed, 154 insertions(+), 89 deletions(-)