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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 DCF07C432C3 for ; Wed, 13 Nov 2019 21:11:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72B4A206EC for ; Wed, 13 Nov 2019 21:12:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="FCmdsICW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72B4A206EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 08A116B0003; Wed, 13 Nov 2019 16:11:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 014266B0005; Wed, 13 Nov 2019 16:11:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E450C6B0006; Wed, 13 Nov 2019 16:11:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id D07086B0003 for ; Wed, 13 Nov 2019 16:11:58 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 9C80A8249980 for ; Wed, 13 Nov 2019 21:11:58 +0000 (UTC) X-FDA: 76152501516.11.soda00_4b68923243711 X-HE-Tag: soda00_4b68923243711 X-Filterd-Recvd-Size: 4974 Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 Nov 2019 21:11:58 +0000 (UTC) Received: by mail-ot1-f68.google.com with SMTP id w24so2449460otk.6 for ; Wed, 13 Nov 2019 13:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=VMOtDktK5nRZtvkNQ1ABpB+ui18anwf6LEg99H2kEls=; b=FCmdsICWDz7CiyQdNCqoFbVHGJm/vIUdM11of8QtCdEqO7kTxrmAzgtKeqkUeUm4PG 8uarwrA7BmME+wfycpyXsjrlY0OfLFDjcp8db0KZVB1KPHsE3eaHzwerC/qPVbP5olIT BWOdSHrdGYBGqY6o1SWe7pGROzLjpICRv+F228I4+OxXBo1Ao3yFFOy8gdsMD9RgakZX w9X8/kT7zMm5mfn8BOLLEhoQiymp+SwxusRI/kp4S/eSbFHrA3Hvxnfw/pv9OJ3maDKU klD3Y8Gx3qNKvg+NG+WblD9vg3DYLW9rYjq1OZ3woFdcGRDFVLLlvezA5YmD5IzQljUk E+Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VMOtDktK5nRZtvkNQ1ABpB+ui18anwf6LEg99H2kEls=; b=U0crX6HJQuEHymlYKy7pOqKoYrQYYGJKYASk/KgXI6UmL4103KsdY5+9Ol1fEyQlHs l3gpAEsjXalir8BIcDcLgS1xTXZmbV76S1ENZuBqvChCBniJBEcPXNFcznUS8jxqckYL PotLFfgAbijhfEt1e/XfaMAtBDdx4b8tb6BrXcbz2UohU9uQuBCpykYpePKgrRSXFIR6 dOnelagLZ3quu/ABqO/U8QsTmFqHsH6Vg/P0VsXgEmAzXw6xIODevSFpKzoB1yUkkwrW KuPW4sxkuw65GDAwYffh15rtlWt+pfAJVwxTzb3PpXQkVVtpIse3JTjpGCPZOO8dLYzS cacQ== X-Gm-Message-State: APjAAAUOS2MToOSyO6uR6y6/Icofz1T0nYXhSbSceeF88dqOJX5DTu4V 3eK+J1YSZYcPNLCQfhf3VTQ4J9G0LVFC14rgVZ+4nw== X-Google-Smtp-Source: APXvYqxSKeojpYQlGp84/x8qspq7fqr/e6I8/BHRNkdeEoelyfRcWNtBcKSzleojEZUw8yIj1FjB/HAbRbhRsY6TSDY= X-Received: by 2002:a9d:5f11:: with SMTP id f17mr4554871oti.207.1573679517249; Wed, 13 Nov 2019 13:11:57 -0800 (PST) MIME-Version: 1.0 References: <7B45B9B3-0947-459A-B4FD-9F6CB2F9EF3A@redhat.com> <28CEC8B8-AC6A-4A13-B5A4-C47DB64B45E6@redhat.com> In-Reply-To: <28CEC8B8-AC6A-4A13-B5A4-C47DB64B45E6@redhat.com> From: Dan Williams Date: Wed, 13 Nov 2019 13:11:46 -0800 Message-ID: Subject: Re: [PATCH 2/3] mm: Introduce subsection_dev_map To: David Hildenbrand Cc: Toshiki Fukasawa , "linux-mm@kvack.org" , "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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.001459, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 13, 2019 at 12:40 PM David Hildenbrand wrote= : [..] > >>>> I'm still struggling to understand the motivation of distinguishing > >>>> "active" as something distinct from "online". As long as the "online= " > >>>> granularity is improved from sections down to subsections then most > >>>> code paths are good to go. The others can use get_devpagemap() to > >>>> check for ZONE_DEVICE in a race free manner as they currently do. > >>> > >>> I thought we wanted to unify access if we don=E2=80=99t really care a= bout the zone as in most pfn walkers - E.g., for zone shrinking. > >> > >> Agree, when the zone does not matter, which is most cases, then > >> pfn_online() and pfn_valid() are sufficient. > > Oh, and just to clarify why I proposed pfn_active(): The issue right now = is that a PFN that is valid but not online could be offline memory (memmap = not initialized) or ZONE_DEVICE. That=E2=80=98s why I wanted to have a way = to detect if a memmap was initialized, independent of the zone. That=E2=80= =98s important for generic PFN walkers. That's what I was debating with Toshiki [1], whether there is a real example of needing to distinguish ZONE_DEVICE from offline memory in a pfn walker. The proposed use case in this patch set of being able to set hwpoison on ZONE_DEVICE pages does not seem like a good idea to me. My suspicion is that this is a common theme and others are looking to do these types page manipulations that only make sense for online memory. If that is the case then treating ZONE_DEVICE as offline seems the right direction. [1]: https://lore.kernel.org/linux-mm/CAPcyv4joVDwiL21PPyJ7E_mMFR2SL3QTi09V= Mtfxb_W+-1p8vQ@mail.gmail.com/