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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12424C433F5 for ; Thu, 13 Jan 2022 11:37:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B0E0E4099E; Thu, 13 Jan 2022 11:37:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PApQXjECnkro; Thu, 13 Jan 2022 11:37:06 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 873F04032D; Thu, 13 Jan 2022 11:37:06 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4A6E5C0030; Thu, 13 Jan 2022 11:37:06 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id CB53AC001E; Thu, 13 Jan 2022 11:37:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B8B6D40924; Thu, 13 Jan 2022 11:37:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WpSexwudVu-s; Thu, 13 Jan 2022 11:37:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by smtp4.osuosl.org (Postfix) with ESMTPS id 90DD94032D; Thu, 13 Jan 2022 11:37:02 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00A67B82192; Thu, 13 Jan 2022 11:37:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E819C36AE3; Thu, 13 Jan 2022 11:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642073818; bh=+YT0N1Ya5C3GpxZb3D9lx91/TA7aYugOCM+xLuWjYus=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y8pNbom+not22khASxC0ueT85weSmm7kwqI+jqij2ZQjNxusyGBuws6c2xcGeS2aN 9swZkNa2lHT+EqUFoHcqwscUUVPriy4Cm4fAIQjZLWNlg7hI9+AtHC/h6in4aJ2vRs 7WBuPU+LvQc6MavLpwW30LJ5V1WHuEA17r/aBUHfdlyYbe4rxmup5KWNk0YUJhq6A4 1fcD63FjDJCSMo+Po0f1aEVflhmsnSpMVI2j8jOkqcPkWMfP5sHyJP3P/iYTWNcU9P LXw/TsOnQN4ucHQJqihS6vgO2Ure2XIVDeeLBPlAh/jMjE6BsbJrJyGGEzGtqUOOm+ bwsfmuQCDueEQ== Date: Thu, 13 Jan 2022 13:36:50 +0200 From: Mike Rapoport To: David Hildenbrand Subject: Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others. Message-ID: References: <20220105214756.91065-1-zi.yan@sent.com> <20220105214756.91065-2-zi.yan@sent.com> <7dc078ef-70f4-159e-b928-34f0fb0ffaea@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7dc078ef-70f4-159e-b928-34f0fb0ffaea@redhat.com> Cc: Mel Gorman , Eric Ren , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Zi Yan , Robin Murphy , Christoph Hellwig , Vlastimil Babka X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: > > From: Zi Yan > > > > This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. > > It prepares for the upcoming removal of the MAX_ORDER-1 alignment > > requirement for CMA and alloc_contig_range(). > > > > MIGRARTE_HIGHATOMIC should not merge with other migratetypes like > > MIGRATE_ISOLATE and MIGRARTE_CMA[1], so this commit prevents that too. > > Also add MIGRARTE_HIGHATOMIC to fallbacks array for completeness. > > > > [1] https://lore.kernel.org/linux-mm/20211130100853.GP3366@techsingularity.net/ > > > > Signed-off-by: Zi Yan > > --- > > include/linux/mmzone.h | 6 ++++++ > > mm/page_alloc.c | 28 ++++++++++++++++++---------- > > 2 files changed, 24 insertions(+), 10 deletions(-) > > ... > > @@ -3545,8 +3553,8 @@ int __isolate_free_page(struct page *page, unsigned int order) > > struct page *endpage = page + (1 << order) - 1; > > for (; page < endpage; page += pageblock_nr_pages) { > > int mt = get_pageblock_migratetype(page); > > - if (!is_migrate_isolate(mt) && !is_migrate_cma(mt) > > - && !is_migrate_highatomic(mt)) > > + /* Only change normal pageblock */ > > + if (migratetype_has_fallback(mt)) > > set_pageblock_migratetype(page, > > MIGRATE_MOVABLE); > > } > > That part is a nice cleanup IMHO. Although the "has fallback" part is a > bit imprecise. "migratetype_is_mergable()" might be a bit clearer. > ideally "migratetype_is_mergable_with_other_types()". Can we come up > with a nice name for that? migratetype_is_mergable() kinda implies "_with_other_types", no? I like migratetype_is_mergable() more than _has_fallback(). My $0.02 to bikeshedding :) > -- > Thanks, > > David / dhildenb > > -- Sincerely yours, Mike. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 559F9C433EF for ; Thu, 13 Jan 2022 11:37:48 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JZMqZ1Z0Fz3bZN for ; Thu, 13 Jan 2022 22:37:46 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Y8pNbom+; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=145.40.68.75; helo=ams.source.kernel.org; envelope-from=rppt@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Y8pNbom+; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JZMpn0smDz2yZW for ; Thu, 13 Jan 2022 22:37:04 +1100 (AEDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00A67B82192; Thu, 13 Jan 2022 11:37:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E819C36AE3; Thu, 13 Jan 2022 11:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642073818; bh=+YT0N1Ya5C3GpxZb3D9lx91/TA7aYugOCM+xLuWjYus=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y8pNbom+not22khASxC0ueT85weSmm7kwqI+jqij2ZQjNxusyGBuws6c2xcGeS2aN 9swZkNa2lHT+EqUFoHcqwscUUVPriy4Cm4fAIQjZLWNlg7hI9+AtHC/h6in4aJ2vRs 7WBuPU+LvQc6MavLpwW30LJ5V1WHuEA17r/aBUHfdlyYbe4rxmup5KWNk0YUJhq6A4 1fcD63FjDJCSMo+Po0f1aEVflhmsnSpMVI2j8jOkqcPkWMfP5sHyJP3P/iYTWNcU9P LXw/TsOnQN4ucHQJqihS6vgO2Ure2XIVDeeLBPlAh/jMjE6BsbJrJyGGEzGtqUOOm+ bwsfmuQCDueEQ== Date: Thu, 13 Jan 2022 13:36:50 +0200 From: Mike Rapoport To: David Hildenbrand Subject: Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others. Message-ID: References: <20220105214756.91065-1-zi.yan@sent.com> <20220105214756.91065-2-zi.yan@sent.com> <7dc078ef-70f4-159e-b928-34f0fb0ffaea@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7dc078ef-70f4-159e-b928-34f0fb0ffaea@redhat.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mel Gorman , Eric Ren , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Zi Yan , Robin Murphy , Christoph Hellwig , Vlastimil Babka , Marek Szyprowski Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: > > From: Zi Yan > > > > This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. > > It prepares for the upcoming removal of the MAX_ORDER-1 alignment > > requirement for CMA and alloc_contig_range(). > > > > MIGRARTE_HIGHATOMIC should not merge with other migratetypes like > > MIGRATE_ISOLATE and MIGRARTE_CMA[1], so this commit prevents that too. > > Also add MIGRARTE_HIGHATOMIC to fallbacks array for completeness. > > > > [1] https://lore.kernel.org/linux-mm/20211130100853.GP3366@techsingularity.net/ > > > > Signed-off-by: Zi Yan > > --- > > include/linux/mmzone.h | 6 ++++++ > > mm/page_alloc.c | 28 ++++++++++++++++++---------- > > 2 files changed, 24 insertions(+), 10 deletions(-) > > ... > > @@ -3545,8 +3553,8 @@ int __isolate_free_page(struct page *page, unsigned int order) > > struct page *endpage = page + (1 << order) - 1; > > for (; page < endpage; page += pageblock_nr_pages) { > > int mt = get_pageblock_migratetype(page); > > - if (!is_migrate_isolate(mt) && !is_migrate_cma(mt) > > - && !is_migrate_highatomic(mt)) > > + /* Only change normal pageblock */ > > + if (migratetype_has_fallback(mt)) > > set_pageblock_migratetype(page, > > MIGRATE_MOVABLE); > > } > > That part is a nice cleanup IMHO. Although the "has fallback" part is a > bit imprecise. "migratetype_is_mergable()" might be a bit clearer. > ideally "migratetype_is_mergable_with_other_types()". Can we come up > with a nice name for that? migratetype_is_mergable() kinda implies "_with_other_types", no? I like migratetype_is_mergable() more than _has_fallback(). My $0.02 to bikeshedding :) > -- > Thanks, > > David / dhildenb > > -- Sincerely yours, Mike. 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 4E23EC433EF for ; Thu, 13 Jan 2022 11:37:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B8D336B0085; Thu, 13 Jan 2022 06:37:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B3C736B0087; Thu, 13 Jan 2022 06:37:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A04096B0088; Thu, 13 Jan 2022 06:37:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8DB2C6B0085 for ; Thu, 13 Jan 2022 06:37:02 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4FDFD181DF77A for ; Thu, 13 Jan 2022 11:37:02 +0000 (UTC) X-FDA: 79025062284.15.DF674CC Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf27.hostedemail.com (Postfix) with ESMTP id BCB5040003 for ; Thu, 13 Jan 2022 11:37:01 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00A67B82192; Thu, 13 Jan 2022 11:37:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E819C36AE3; Thu, 13 Jan 2022 11:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642073818; bh=+YT0N1Ya5C3GpxZb3D9lx91/TA7aYugOCM+xLuWjYus=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y8pNbom+not22khASxC0ueT85weSmm7kwqI+jqij2ZQjNxusyGBuws6c2xcGeS2aN 9swZkNa2lHT+EqUFoHcqwscUUVPriy4Cm4fAIQjZLWNlg7hI9+AtHC/h6in4aJ2vRs 7WBuPU+LvQc6MavLpwW30LJ5V1WHuEA17r/aBUHfdlyYbe4rxmup5KWNk0YUJhq6A4 1fcD63FjDJCSMo+Po0f1aEVflhmsnSpMVI2j8jOkqcPkWMfP5sHyJP3P/iYTWNcU9P LXw/TsOnQN4ucHQJqihS6vgO2Ure2XIVDeeLBPlAh/jMjE6BsbJrJyGGEzGtqUOOm+ bwsfmuQCDueEQ== Date: Thu, 13 Jan 2022 13:36:50 +0200 From: Mike Rapoport To: David Hildenbrand Cc: Zi Yan , linux-mm@kvack.org, 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 Subject: Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others. Message-ID: References: <20220105214756.91065-1-zi.yan@sent.com> <20220105214756.91065-2-zi.yan@sent.com> <7dc078ef-70f4-159e-b928-34f0fb0ffaea@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7dc078ef-70f4-159e-b928-34f0fb0ffaea@redhat.com> X-Rspamd-Queue-Id: BCB5040003 X-Stat-Signature: 6ub7wz5iaeacpu6h8ytnwmnqdb9ritob Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Y8pNbom+; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org X-Rspamd-Server: rspam08 X-HE-Tag: 1642073821-588334 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 Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: > > From: Zi Yan > > > > This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. > > It prepares for the upcoming removal of the MAX_ORDER-1 alignment > > requirement for CMA and alloc_contig_range(). > > > > MIGRARTE_HIGHATOMIC should not merge with other migratetypes like > > MIGRATE_ISOLATE and MIGRARTE_CMA[1], so this commit prevents that too. > > Also add MIGRARTE_HIGHATOMIC to fallbacks array for completeness. > > > > [1] https://lore.kernel.org/linux-mm/20211130100853.GP3366@techsingularity.net/ > > > > Signed-off-by: Zi Yan > > --- > > include/linux/mmzone.h | 6 ++++++ > > mm/page_alloc.c | 28 ++++++++++++++++++---------- > > 2 files changed, 24 insertions(+), 10 deletions(-) > > ... > > @@ -3545,8 +3553,8 @@ int __isolate_free_page(struct page *page, unsigned int order) > > struct page *endpage = page + (1 << order) - 1; > > for (; page < endpage; page += pageblock_nr_pages) { > > int mt = get_pageblock_migratetype(page); > > - if (!is_migrate_isolate(mt) && !is_migrate_cma(mt) > > - && !is_migrate_highatomic(mt)) > > + /* Only change normal pageblock */ > > + if (migratetype_has_fallback(mt)) > > set_pageblock_migratetype(page, > > MIGRATE_MOVABLE); > > } > > That part is a nice cleanup IMHO. Although the "has fallback" part is a > bit imprecise. "migratetype_is_mergable()" might be a bit clearer. > ideally "migratetype_is_mergable_with_other_types()". Can we come up > with a nice name for that? migratetype_is_mergable() kinda implies "_with_other_types", no? I like migratetype_is_mergable() more than _has_fallback(). My $0.02 to bikeshedding :) > -- > Thanks, > > David / dhildenb > > -- Sincerely yours, Mike.