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, DKIM_VALID_AU,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 519A2C432C3 for ; Wed, 13 Nov 2019 21:22:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1BD3D206E3 for ; Wed, 13 Nov 2019 21:22:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZtvdYr2b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BD3D206E3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B7E656B0003; Wed, 13 Nov 2019 16:22:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B2F1F6B0005; Wed, 13 Nov 2019 16:22:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A1D416B0006; Wed, 13 Nov 2019 16:22:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 8ECC36B0003 for ; Wed, 13 Nov 2019 16:22:56 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 364A68249980 for ; Wed, 13 Nov 2019 21:22:56 +0000 (UTC) X-FDA: 76152529152.08.humor91_19898ceff560e X-HE-Tag: humor91_19898ceff560e X-Filterd-Recvd-Size: 6310 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 Nov 2019 21:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573680174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xEzo2vwLZjPjo79V3NSCv0uzS6NnVJqYYive5MQEnio=; b=ZtvdYr2bgZpCjsJtg7uwQ+Q7V3bCNcfTQ9CQNHl0mYVe2En8IYap28YnUeIkHcvNN3FaEX EFX+eqOUNiLcw/CUBZumxutCSVAgMDw3nNlSFM84J33hXmPh02zV39UMZIpZEh8IiL5JO8 OVBx1qfP6JsfJaNXEcNeAM9HSDzGB8M= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-311-Px0bX8j0OkWRTNn1BhSKjg-1; Wed, 13 Nov 2019 16:22:51 -0500 Received: by mail-wm1-f70.google.com with SMTP id f191so2389423wme.1 for ; Wed, 13 Nov 2019 13:22:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=0M1Zgy0vxFoFP5/tV9MR/RlrQo4XZunSomplfBOMFgs=; b=QiTG5p+ctS/O+H/BkHPegQTWS3xnasTSmiSQyvpINfWB3r0/rQvFPipQRF2j+RYRa5 q5ioETeiiiJXEyySdpjQjMBls8T/IXLFy3SiQUb5CfImGoF3x16r9c7hxKE39rkBLg4k Rm49j3U33WRI337Z9e8dWPT4W54S8muWM4OsfiwoTLniq7IG5G9SfPrO4tQEd/2UYhLr jrx0zT5bB6lWW5GtgPo/0B9o3PnM0ASpqhrX5x2T7XaGG63VEHW+k90TGLY+a66pcL4p YdVqjpDNw7w/p9LFKZl2FbPPfqgtC2Z1DUMmloGNaMFB7Yu7z3Sw9HwxOFY5slB/CpWi f2Cg== X-Gm-Message-State: APjAAAUVUCbAT7FbswUjbl9tawvS3QKQZly4dMS3fzwXcbImdQOwKX7q hfhcsY/zF1S6aQEgBGSfdmVpVld6CJgEbTykjxcO3z37yWPMPAE9MvIgM4VZyH6D8I7pkHZalW1 95UrRUgNTzww= X-Received: by 2002:a7b:ce11:: with SMTP id m17mr5024147wmc.113.1573680170423; Wed, 13 Nov 2019 13:22:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzEVgBlG4P7CSVjUC2mczFP5f7xAgjTp5OSlvHE+YRruvah5qetSi7fIBN/9yaK/Yq8atTG/Q== X-Received: by 2002:a7b:ce11:: with SMTP id m17mr5024113wmc.113.1573680170187; Wed, 13 Nov 2019 13:22:50 -0800 (PST) Received: from [192.168.3.122] (p5B0C63AB.dip0.t-ipconnect.de. [91.12.99.171]) by smtp.gmail.com with ESMTPSA id j11sm4207776wrq.26.2019.11.13.13.22.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Nov 2019 13:22:49 -0800 (PST) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 2/3] mm: Introduce subsection_dev_map Date: Wed, 13 Nov 2019 22:22:48 +0100 Message-Id: <3E71366A-9232-46BB-8261-3FCB2300C80A@redhat.com> References: Cc: David Hildenbrand , 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 , Oscar Salvador In-Reply-To: To: Dan Williams X-Mailer: iPhone Mail (17A878) X-MC-Unique: Px0bX8j0OkWRTNn1BhSKjg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000086, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > Am 13.11.2019 um 22:12 schrieb Dan Williams : >=20 > =EF=BB=BFOn 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. >>>>>=20 >>>>> 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. >>>>=20 >>>> Agree, when the zone does not matter, which is most cases, then >>>> pfn_online() and pfn_valid() are sufficient. >>=20 >> 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. >=20 > 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. Right. At least it would be nice to have for zone shrinking - not sure abou= t the other walkers. We would have to special-case ZONE_DEVICE handling the= re. But as I said, a subsection map for online memory is a good start, especial= ly to fix pfn_to_online_page(). Also, I think this might be a very good thi= ng to have for Oscars memmap-on-memory work (I have a plan in my head I can= discuss with Oscar once he has time to work on that again). >=20 > [1]: https://lore.kernel.org/linux-mm/CAPcyv4joVDwiL21PPyJ7E_mMFR2SL3QTi0= 9VMtfxb_W+-1p8vQ@mail.gmail.com/ >=20