Received: by 10.223.164.202 with SMTP id h10csp1516728wrb; Wed, 8 Nov 2017 05:34:57 -0800 (PST) X-Google-Smtp-Source: ABhQp+Txj+u7EfqNkN+f5p4mw96j16g8L3YkWaffAh5r0IwVKCjegnRN04AgBuAK7WDqcW4z++5J X-Received: by 10.98.210.129 with SMTP id c123mr560811pfg.77.1510148097845; Wed, 08 Nov 2017 05:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510148097; cv=none; d=google.com; s=arc-20160816; b=y7ooLIwh/TLC8AzY/9F3VnKVtYE8uXsmJ7eogCtphcHSlNNsvXptXdAUbrORZsWzKo v/CZPlKbLNemT6x1725lIqDyloCdjAT7GMsjAHXqeEK5+rgXYucJCR4GL41Nu5fqkx5q hmmZtB+Q2TnNTIhsoTVy2bYH6Mpyys4biCfn2Lfaq3Md6ARf5eN4cDzytAErj9ZLr0No M4bymNQfqYmUGLxXqmHzkhGenTMOCV7ML+UDWnVKbuDvUQhYUS4SqrAZShSgXDuPbXPR bytD6AlUC46RNJjWrOZUKFlEYhXn1o/XrhrVz540zm1uYBI1dqgwv2Xpv4GKfLdo4a0h djIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=gReVDH9ESm7QRQEgpGc+DARg4QFnhPT2t7roVszK6JM=; b=ufi505UJTTcAnwnM7stFy6lhFC7bTChh0uTQ1kaJHzQK4wyKP9qF1A9X5iAtJp3vjy gH0ngQWl5A9REFR8hK/59j6Ub5+A9W3Vlh3Xi38g13Py4dH0HxX8m7ZZL4fUhmxe+1Bk V5tenOEnqnTT9ic8DDpXcb/eZ//HlZstAADdnPlMx+X6boFKjhvdjuYe6e9TZZnyA8d9 xixYUvbVyhbxUPjv+6PRQDmlxCA7iH8VTdpJwY041ZiMuG6COVhQTDJuaO/WZgbo1m+p McDMZd8ko5plhAzgOLpFjeQkm0H9jyW4mYV74xZXiOpVWZNPIE5LZDGLVFy9TWSBSi/F xNyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qsrV8RQo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o88si4218685pfk.294.2017.11.08.05.34.46; Wed, 08 Nov 2017 05:34:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qsrV8RQo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbdKHNdy (ORCPT + 82 others); Wed, 8 Nov 2017 08:33:54 -0500 Received: from mail-ot0-f196.google.com ([74.125.82.196]:45167 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752533AbdKHNdw (ORCPT ); Wed, 8 Nov 2017 08:33:52 -0500 Received: by mail-ot0-f196.google.com with SMTP id q99so2282474ota.2 for ; Wed, 08 Nov 2017 05:33:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gReVDH9ESm7QRQEgpGc+DARg4QFnhPT2t7roVszK6JM=; b=qsrV8RQoyHBOO4juWKFN6tDGfY8okrGgsCUTXrVSfKmqrQ3viKpKIvbskh70SMOgv7 i1RsfOeVdM6Yll9osMG79Z1ZddDpQu9xaAP+tC2KILH4ohoOV0PFKDPlLKLep1ssTCcT nHG/vlefrMRkUa2c1Mv3RAHlW/k3NzUnaSviLvqG0TmAVmxIgcRfqnIpc7zwfhT01qQL RYKZpzuWxxHfvRsvPAiUw6s5iLPNr1a9EqUPz/1XAekoCbaGcL9MfPAamNrn6+1zjqmG bu0R8m7BijLzPMCIWVvNz4g2Sk3TUfd/mD+XOVJDZmCJ95tyc38NGaZEpNSVtbyWdc4o ZTTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gReVDH9ESm7QRQEgpGc+DARg4QFnhPT2t7roVszK6JM=; b=Gux28HIs2dqmArEc2gtwgbqRX248m9Cj+E2jeuI/tB3QT/I90XybnV9XKpsK42wlKO dkN6klfQ1wEu/IErPSAiytG3mdUtcoBtu1bxNSFUAnB/iLbIu4jLqOkJVmvtkWA8GErs +Ua5TIro0a+sYhewBYlENYcLVut3TtzhBmMFECTDLXLlSxnB0KPykiU/ae1CARUuPRue qAmNjcyfHAMD0iNfUaJdfdfvWlr1qDDRqM70gmxI6Co/54GZTkA6rpw/6FUSgT3bIXq2 UEQmLTscvroWewyhP8qlMR99p9MxJGrTugJ4XFR4D/mUDM2dwmyN/q/WRY4xOWAiMkxZ oFeA== X-Gm-Message-State: AJaThX4h/OHMnNTfjld5LYS3DUkqAPWOtM1HnCRNVY5HZF/vUKrofMAm VvvU3GMxndVFF0PpL2xLKzkjTbQzroeSbcotO78= X-Received: by 10.157.11.24 with SMTP id a24mr344495ota.401.1510148031758; Wed, 08 Nov 2017 05:33:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.168.0.79 with HTTP; Wed, 8 Nov 2017 05:33:51 -0800 (PST) In-Reply-To: <20171108075242.GB18747@js1304-P5Q-DELUXE> References: <20171107094447.14763-1-jaewon31.kim@samsung.com> <20171108075242.GB18747@js1304-P5Q-DELUXE> From: Jaewon Kim Date: Wed, 8 Nov 2017 22:33:51 +0900 Message-ID: Subject: Re: [PATCH] mm: page_ext: allocate page extension though first PFN is invalid To: Joonsoo Kim Cc: Jaewon Kim , Andrew Morton , mhocko@suse.com, vbabka@suse.cz, minchan@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-08 16:52 GMT+09:00 Joonsoo Kim : > On Tue, Nov 07, 2017 at 06:44:47PM +0900, Jaewon Kim wrote: >> online_page_ext and page_ext_init allocate page_ext for each section, but >> they do not allocate if the first PFN is !pfn_present(pfn) or >> !pfn_valid(pfn). >> >> Though the first page is not valid, page_ext could be useful for other >> pages in the section. But checking all PFNs in a section may be time >> consuming job. Let's check each (section count / 16) PFN, then prepare >> page_ext if any PFN is present or valid. > > I guess that this kind of section is not so many. And, this is for > debugging so completeness would be important. It's better to check > all pfn in the section. Thank you for your comment. AFAIK physical memory address depends on HW SoC. Sometimes a SoC remains few GB address region hole between few GB DRAM and other few GB DRAM such as 2GB under 4GB address and 2GB beyond 4GB address and holes between them. If SoC designs so big hole between actual mapping, I thought too much time will be spent on just checking all the PFNs. Anyway if we decide to check all PFNs, I can change patch to t_pfn++ like below. Please give me comment again. while (t_pfn < ALIGN(pfn + 1, PAGES_PER_SECTION)) { if (pfn_valid(t_pfn)) { valid = true; break; } - t_pfn = ALIGN(pfn + 1, PAGES_PER_SECTION >> 4); + t_pfn++; Thank you Jaewon Kim > > Thanks. > From 1583483740812733983@xxx Wed Nov 08 07:56:14 +0000 2017 X-GM-THRID: 1583432714503940064 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread