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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A051C433F5 for ; Fri, 14 Jan 2022 13:38:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91D206B0072; Fri, 14 Jan 2022 08:38:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CCBC6B0073; Fri, 14 Jan 2022 08:38:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 746696B0074; Fri, 14 Jan 2022 08:38:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay025.a.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 628F56B0072 for ; Fri, 14 Jan 2022 08:38:36 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 324261AF5 for ; Fri, 14 Jan 2022 13:38:36 +0000 (UTC) X-FDA: 79028997432.02.7AD918F Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 339E51C0009 for ; Fri, 14 Jan 2022 13:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642167513; 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=NbLWpbs04Fbr52VNRcUjKYlBXFjrwmcMdjglRxFIjmA=; b=IIvHHkH4DDbSJYx3DZcZxj+vKTflV1xhkV/lcVuxZhQIbBKqb4pZKtxdzA4OJCtQLPJqR7 sJ+YHELayk4+J1jZ4XmNrW6jpZHmcDHpNdcmRQ208V7MA411nqk3smDNCxst+Tw1bGItg7 a0gm30Z76kJo09L1Tva3WkwXx+VL/f4= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-653-a-7skmTdPhSOdWnTEihXMw-1; Fri, 14 Jan 2022 08:38:32 -0500 X-MC-Unique: a-7skmTdPhSOdWnTEihXMw-1 Received: by mail-ed1-f72.google.com with SMTP id v18-20020a056402349200b003f8d3b7ee8dso8354658edc.23 for ; Fri, 14 Jan 2022 05:38:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=NbLWpbs04Fbr52VNRcUjKYlBXFjrwmcMdjglRxFIjmA=; b=6mLThqV0RGDtgNf/K58sHihsMskM1yFt3obgClmCBy5wbPhNcqnYBvsngIWfv5B9SD pclHEd/5eqa8VVWdqi25yoYojnmRE1Cu4TvIOaXYz6daFxi5eZbKahmf2A4YZxNxesZ1 Oei3iU0WNERuUCRoSEnLSX2BWKQ3nhGiwq7D67igwkG9hl9vA4k7NfyFicoC+bNq0A6p pLToZy36nq4yKDpeYtLGS14y+C/XY4E4XVIRMqlXB0H5zZajrsnsYcO5QjnVmD1JWBoO IPjUfTo2w6ZUjgULdsH6C58c228Dtvs/qilQEPm//aM1ioM3wUuNX1/e01cb9uVk1ci/ Sg7w== X-Gm-Message-State: AOAM532km7XpZ+LTxSCRXfM3wa+Pw91ArM1ViBbOBgB/fQKvnECpvOG9 eJgJ1ha+gnwlcSCPZYUEI1P7k74SulecNv9mabN25W/f6jH71MmS5p8Is+/pZ025+7xvWE/RGrP WwFm1v9D1pTY= X-Received: by 2002:a05:6402:22f5:: with SMTP id dn21mr8277777edb.195.1642167511647; Fri, 14 Jan 2022 05:38:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHvYz3VQ9C1aagG3+wcF6jvkOYHX0vhK+bpyMkPVNgdDNTqGPKVyjbaru5jr4nQAEJhmT6JQ== X-Received: by 2002:a05:6402:22f5:: with SMTP id dn21mr8277761edb.195.1642167511469; Fri, 14 Jan 2022 05:38:31 -0800 (PST) Received: from ?IPV6:2003:cb:c701:9d00:ff87:1c9b:108a:9702? (p200300cbc7019d00ff871c9b108a9702.dip0.t-ipconnect.de. [2003:cb:c701:9d00:ff87:1c9b:108a:9702]) by smtp.gmail.com with ESMTPSA id c13sm1900839ejj.144.2022.01.14.05.38.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Jan 2022 05:38:31 -0800 (PST) Message-ID: Date: Fri, 14 Jan 2022 14:38:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [RFC PATCH v3 5/8] mm: page_isolation: check specified range for unmovable pages during isolation. To: Zi Yan , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Michael Ellerman , Christoph Hellwig , Marek Szyprowski , Robin Murphy , linuxppc-dev@lists.ozlabs.org, virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, Vlastimil Babka , Mel Gorman , Eric Ren References: <20220105214756.91065-1-zi.yan@sent.com> <20220105214756.91065-6-zi.yan@sent.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220105214756.91065-6-zi.yan@sent.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 339E51C0009 X-Stat-Signature: w5bga4ynrcnojf6qu4gsa43p3phpf7t9 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IIvHHkH4; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf20.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam03 X-HE-Tag: 1642167514-103923 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 05.01.22 22:47, Zi Yan wrote: > From: Zi Yan > > Enable set_migratetype_isolate() to check specified sub-range for > unmovable pages during isolation. Page isolation is done > at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all > pages within that granularity are intended to be isolated. For example, > alloc_contig_range(), which uses page isolation, allows ranges without > alignment. This commit makes unmovable page check only look for > interesting pages, so that page isolation can succeed for any > non-overlapping ranges. Are you handling if we start checking in the middle of a compound page and actually have to lookup the head to figure out if movable or not? > > has_unmovable_pages() is moved to mm/page_isolation.c since it is only > used by page isolation. Please move that into a separate patch upfront, makes this patch much easier to review. -- Thanks, David / dhildenb