Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp568161pxu; Fri, 4 Dec 2020 09:54:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJx//ckLTeURWMjY7cluZP9NesTkdQ691MhxAORu33oI3lNjsEFNmBG0byksuvNNCMN17t87 X-Received: by 2002:a05:6402:1803:: with SMTP id g3mr8854774edy.10.1607104465372; Fri, 04 Dec 2020 09:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607104465; cv=none; d=google.com; s=arc-20160816; b=GxJxUUrumEPR050StknCphWIlHsbS7O1I+WhZLN7yZ/wMj7amcEeiIs2o85EA+oRbX sVrRDPGV/Pxpu9RYmvrNwY3oqgM3KAElaHlndnwu0JlwzxUU5uEZ9bnzjPOyfZx7B2Y5 ZLSv+dKLvnesZrlujxjZ7TnE+pxRg5i0vkEa5IQl32mCTOVd+2X06cTZAy2gWWlDQbeu dYlo7v+ARpY3YSxvS//+7/wlgZZNHUMrXiXgJ46uOY09PjeyBVjV0Akw4BTUszwoBHz8 3Lmdt2q+VW2JyyFfRUIVCyH6pas0OlJnrMyhqt971jbXrwi5BaGLJbQ6a5jv0vv+Hqmv jBHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=31hFFArVFLayAbe984Eq857Ijkymag2EX547dIYCVVI=; b=blOBl/zFxGIeQNDgdCRXTDdG3KcGfY6rAESET+wqhKpxEWluL2aPY5/ShN1/t5Dk+O dYLZKn1Zbq1u5iQiezxDe8Pl4rwANphuZJ6mPkzwzhT7ixHo4mQF9tF4oU14DwRlwJIa 64P53G6gOZcwNLUCBFYEs7jFAyVr/kpnI78ut/ou5mhd00bImWfgG+mHWIQnJHOQXbfS cnjXz9wb4/LGT3nVMmhsWtEZ3MqGkDx2aAonvzqrQTekfMMJtwzorVhBnu6FDWEDMqWZ Pl9VYFjD8sohDVN8yXLPX+H5PeO13CcdqhntulQdJQmCzvxsoHQaY6Nn9Xc5f/5oZ2Oe 0lVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@soleen.com header.s=google header.b=BrJgrP7V; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si1108256eje.256.2020.12.04.09.54.02; Fri, 04 Dec 2020 09:54:25 -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=@soleen.com header.s=google header.b=BrJgrP7V; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgLDRwO (ORCPT + 99 others); Fri, 4 Dec 2020 12:52:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbgLDRwN (ORCPT ); Fri, 4 Dec 2020 12:52:13 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8E7C0613D1 for ; Fri, 4 Dec 2020 09:51:33 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id a16so9925594ejj.5 for ; Fri, 04 Dec 2020 09:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=31hFFArVFLayAbe984Eq857Ijkymag2EX547dIYCVVI=; b=BrJgrP7Vo3LsmjP4/uK2WLmNtvnlKQyJEgcHA5V4T3luCMqNP3fshfXe3HuzodHt6N JSLH3JnZlJTHfVDwCtHwD2/CTz2RYeTVdOrgd2tziEliPzMWNRwdbC+1cYlekpPqoDCP Im+3pT9EMLVmgyto13Vn0baiJoH2KNA9WJHLqX+0JKEkZNiVhHVuyFjkhVCyeio42C6V 1mIpkLUflzsJLCB/dzLd1YjC9x4tYWkJejs/98rtk762W2VNuIvdWnwZh2qZbNGF6khU ASF4BNQnqx/5CYt4fw5dzqAKRDmqMpkNDMBFs9ZvXvqHELGFEyjqBJxY2cp4a6VIhqGj g7WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=31hFFArVFLayAbe984Eq857Ijkymag2EX547dIYCVVI=; b=XemS3x9UUz9idsNbUGnd45UwnBQLnZ8p+68UowW9NTPXHxOCoR1okQANWfHNtw5U/S eLZFZMQKHO60hnDn7HKsba9HZA1IoNdNhEsW2MK0dn+QMwjXo4eamK+Zz7VgiZNmNbtl fUMYZ/5TsH3TjXYbgo2Mrv9k9Ikt45gl7h2eiwmVa6Lh51UJYQMHXiDwo2tt6Xl6JoXB WZrjLmfDFH+XaxIv25GL2bzVYPPqfREa0ZWVOTxZoUVA0gMys/cqFWeS9HUFnTb5kNz1 R6HUVKlf4RfOCIA4Ofunm3mVzIHL6Y/hNM6ZJXx3ZpyzqjdC68Qitqi+1rY81282BHNj SJnQ== X-Gm-Message-State: AOAM533gPK9BJrSVA9psAY+tESpty/CQjvgL5TBcNdc+tU02UsLBbaKJ l70OC4HKnRxMhFCiCoyozcEGA/hDwlcRlQHOepCOzg== X-Received: by 2002:a17:906:fb9b:: with SMTP id lr27mr8443175ejb.175.1607104291943; Fri, 04 Dec 2020 09:51:31 -0800 (PST) MIME-Version: 1.0 References: <20201202052330.474592-1-pasha.tatashin@soleen.com> <20201204035953.GA17056@js1304-desktop> <20201204161005.GD5487@ziepe.ca> In-Reply-To: <20201204161005.GD5487@ziepe.ca> From: Pavel Tatashin Date: Fri, 4 Dec 2020 12:50:56 -0500 Message-ID: Subject: Re: [PATCH 0/6] prohibit pinning pages in ZONE_MOVABLE To: Jason Gunthorpe Cc: Joonsoo Kim , LKML , linux-mm , Andrew Morton , Vlastimil Babka , Michal Hocko , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > 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 functionality, and not availability of THP, however, I did not know about the use case where some admins might configure ZONE_MOVABLE to increase availability of THP because pages are always migratable in them. The thing is, if we fragment ZONE_MOVABLE by pinning pages in it, the availability of THP also suffers. We can migrate pages in ZONE_NORMAL, just not guaranteed, so we can create THP in ZONE_NORMAL as well, which is the usual case.