Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2341888pxu; Mon, 7 Dec 2020 04:17:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsgIOYlfbUzuNtEyP0wsOP7nnci0BI7p3e/1/J/9qZ59h7geu1U+xlCCpG2FbJ3JCBCcyO X-Received: by 2002:a50:875b:: with SMTP id 27mr19876063edv.24.1607343455614; Mon, 07 Dec 2020 04:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607343455; cv=none; d=google.com; s=arc-20160816; b=pZ7LyKXg2tlbjccvpzdbsxu5Hs971Er2W5Sc5DH36Jki/uvA1jAqkaTN7x/YH0CffE IJ47nA7uTGB5Mfku/Ay+5e1KSL/uj1ZCqpSk9y+ncsU8GYDRt9EKktSV0M9/Iy3Ubb+V 1VV13u+iFGCM6rc9c9E535x3ZYyDcWTnQFLKct+Khg4h8SRCtgwrlQJg6x5B0dEpP/UU Hmj8LR7v7iWXgspTjiRKoe4ax3zq4iwnQk42U34gp0TyKGsfhmH74q98jdTTQ7F/PXrC y+DLwmOpJHEjiros/KkBO3Z1wRFfPOsNJrs0kiwb/u+QDuK3ZzVsWqMpiUCHWvFaWOPN oPdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N5aTOOY1yDto3hlZWd7sMkEsRnR8D/QRsIEYRP0S3jQ=; b=M4pHyEJj9HJXhxZIFWQrTZfzFoKNQfK8TBcBRj4wS1qraZGecMa17A2JvZ0wBDKHZ7 FV+Lf3tJ0ldXvasXoKe4YMRuKNebnBxhRBllOXRxs+Pc3Rui1RF/tVo1jYbt2yPF0kPm KdfdxdjjjEpEo9uzqopoJMgkrGjulip2M4wo2qAZqkxNsgF+aKB1yrmnB3nNq7te5Atd d5ZnJL1UuLgkE9PAfZUSegbzh5ntVh6NFXQ9xTFBW8tjdNUQ0LLVHbRFzfTQMUev932k 3h7aU5L2u805RrqLeybTRFnmwlLPrNx97eFkBq6uxeMtNCItfymtC50OlsBuEMbEyX29 bcKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=jBO+lhrG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si5029166ejd.577.2020.12.07.04.17.11; Mon, 07 Dec 2020 04:17:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=jBO+lhrG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727225AbgLGMN4 (ORCPT + 99 others); Mon, 7 Dec 2020 07:13:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:49440 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727004AbgLGMN4 (ORCPT ); Mon, 7 Dec 2020 07:13:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1607343189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=N5aTOOY1yDto3hlZWd7sMkEsRnR8D/QRsIEYRP0S3jQ=; b=jBO+lhrGUzRYbOAoxA1UXH9qf/XtMGzeReS9iN55wAuBNvNTaz6+xRKs8VHwziT0y73eTI C7aCVZHr9IkrnJhXTGqpPMuyRlCuun0XMA8Gl4MxeXRj5N5uRLg9KPyyPtsv8O0fRya1uS kkffOn+VWKJgCazdeXzSJNcwruVo5yo= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 80B41AC90; Mon, 7 Dec 2020 12:13:09 +0000 (UTC) Date: Mon, 7 Dec 2020 13:13:07 +0100 From: Michal Hocko To: Joonsoo Kim Cc: Pavel Tatashin , Jason Gunthorpe , LKML , linux-mm , Andrew Morton , Vlastimil Babka , David Hildenbrand , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , mike.kravetz@oracle.com, Steven Rostedt , Ingo Molnar , Peter Zijlstra , Mel Gorman , Matthew Wilcox , David Rientjes , John Hubbard Subject: Re: [PATCH 0/6] prohibit pinning pages in ZONE_MOVABLE Message-ID: <20201207121307.GG25569@dhcp22.suse.cz> References: <20201202052330.474592-1-pasha.tatashin@soleen.com> <20201204035953.GA17056@js1304-desktop> <20201204161005.GD5487@ziepe.ca> <20201207071238.GA10731@js1304-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201207071238.GA10731@js1304-desktop> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 07-12-20 16:12:50, Joonsoo Kim wrote: > On Fri, Dec 04, 2020 at 12:50:56PM -0500, Pavel Tatashin wrote: > > > > Yes, this indeed could be a problem for some configurations. I will > > > > add your comment to the commit log of one of the patches. > > > > > > It sounds like there is some inherent tension here, breaking THP's > > > when doing pin_user_pages() is a really nasty thing to do. DMA > > > benefits greatly from THP. > > > > > > I know nothing about ZONE_MOVABLE, is this auto-setup or an admin > > > option? If the result of this patch is standard systems can no longer > > > pin > 80% of their memory I have some regression concerns.. > > > > ZONE_MOVABLE can be configured via kernel parameter, or when memory > > nodes are onlined after hot-add; so this is something that admins > > configure. ZONE_MOVABLE is designed to gurantee memory hot-plug > > Just note, the origin of ZONE_MOVABLE is to provide availability of > huge page, especially, hugetlb page. AFAIK, not guarantee memory > hot-plug. See following commit that introduces the ZONE_MOVABLE. > > 2a1e274 Create the ZONE_MOVABLE zone > > > functionality, and not availability of THP, however, I did not know > > about the use case where some admins might configure ZONE_MOVABLE to > > The usecase is lightly mentioned in previous discussion. > > http://lkml.kernel.org/r/alpine.DEB.2.23.453.2011221300100.2830030@chino.kir.corp.google.com > > Anyway, I agree with your other arguments and this patchset. Yes, historically the original motivation for the movable zone was to help creating large pages via compaction. I also do remember Mel not being particularly happy about that. The thing is that the movability constrain is just too strict for this usecases because the movable zone, especially a lot of it, might be causing similar to lowmem/highmem problems very well known from 32b world. So an admin had to be always very careful when configuring to not cause zone pressure problems. Later on, with a higher demand on the memory hotplug - especially the hotremove usecases - it has become clear that the only reliable way for the memory offlining is to rule out any unmovable memory out of the way and that is why a rather strong properly of movable zone was relied on. In the end we are in two rather different requirements here. One for optimization and one for correctness. In this case I would much rather focus on the correctness aspect. -- Michal Hocko SUSE Labs