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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 4A7DCC56202 for ; Wed, 25 Nov 2020 19:33:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B07F0207BC for ; Wed, 25 Nov 2020 19:33:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KuYQJ3Js" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B07F0207BC 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 2FC746B005D; Wed, 25 Nov 2020 14:33:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AD6D6B0070; Wed, 25 Nov 2020 14:33:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1EA4A6B0071; Wed, 25 Nov 2020 14:33:12 -0500 (EST) 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 085BB6B005D for ; Wed, 25 Nov 2020 14:33:12 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C1339180AD811 for ; Wed, 25 Nov 2020 19:33:11 +0000 (UTC) X-FDA: 77523938982.30.swing09_2d05a8c27379 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 9EB93180B3C83 for ; Wed, 25 Nov 2020 19:33:11 +0000 (UTC) X-HE-Tag: swing09_2d05a8c27379 X-Filterd-Recvd-Size: 4623 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Wed, 25 Nov 2020 19:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606332790; 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=DCzZEjGV2+6wxo4yercQuWLJShcOU76TLNb98oZ3taM=; b=KuYQJ3JswxLf1cfdjHBq7+Z8g48kLf+A7+WlMRFeOaFZvIcm+pkGXkqqLyDEMfCC5D7F9S 37U3eAIpkSzrK0NcmASuL0RXGkSfjAiiR4B39QtHu7veUVwftdmlGnCkmtkmVgWd+fpuFs ISJNDAxAkApNajzTwVAwoSdFNe9xbM4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-157-m972k9RhMCax67Q8beC-Ww-1; Wed, 25 Nov 2020 14:33:06 -0500 X-MC-Unique: m972k9RhMCax67Q8beC-Ww-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13EDA1084C80; Wed, 25 Nov 2020 19:33:05 +0000 (UTC) Received: from [10.36.112.131] (ovpn-112-131.ams2.redhat.com [10.36.112.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 239A75D9C6; Wed, 25 Nov 2020 19:33:02 +0000 (UTC) Subject: Re: [PATCH 1/1] mm: compaction: avoid fast_isolate_around() to set pageblock_skip on reserved pages To: Andrea Arcangeli , Vlastimil Babka Cc: Mel Gorman , Andrew Morton , linux-mm@kvack.org, Qian Cai , Michal Hocko , linux-kernel@vger.kernel.org, Mike Rapoport , Baoquan He References: <8C537EB7-85EE-4DCF-943E-3CC0ED0DF56D@lca.pw> <20201121194506.13464-1-aarcange@redhat.com> <20201121194506.13464-2-aarcange@redhat.com> <1c4c405b-52e0-cf6b-1f82-91a0a1e3dd53@suse.cz> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <424bba1c-d9af-e2a9-0b5a-3a71d525bf30@redhat.com> Date: Wed, 25 Nov 2020 20:33:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: On 25.11.20 20:01, Andrea Arcangeli wrote: > On Wed, Nov 25, 2020 at 01:08:54PM +0100, Vlastimil Babka wrote: >> Yeah I guess it would be simpler if zoneid/nid was correct for >> pfn_valid() pfns within a zone's range, even if they are reserved due >> not not being really usable memory. >> >> I don't think we want to introduce CONFIG_HOLES_IN_ZONE to x86. If the >> chosen solution is to make this to a real hole, the hole should be >> extended to MAX_ORDER_NR_PAGES aligned boundaries. > > The way pfn_valid works it's not possible to render all non-RAM pfn as > !pfn_valid, CONFIG_HOLES_IN_ZONE would not achieve it 100% either. So Well, we could do it the arm64 way and provide a custom pfn_valid() and check memblock for RAM - please don't! :D > I don't think we can rely on that to eliminate all non-RAM reserved > pages from the mem_map and avoid having to initialize them in the > first place. Some could remain as in this case since in the same > pageblock there's non-RAM followed by RAM and all pfn are valid. > >> In any case, compaction code can't fix this with better range checks. > > David's correct that it can, by adding enough PageReserved (I'm > running all systems reproducing this with plenty of PageReserved > checks in all places to work around it until we do a proper fix). > > My problem with that is that 1) it's simply non enforceable at runtime > that there is not missing PageReserved check and 2) what benefit it > would provide to leave a wrong zoneid in reserved pages and having to > add extra PageReserved checks? See my other mail. If we have a clean way to set *any* memmap (non-RAM, memory holes at any place) to a proper nid/zid, then we won't need reserved checks. I raised some cases that need more thought than a simple "hole in zone". -- Thanks, David / dhildenb