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 6DD9DC433F5 for ; Thu, 5 May 2022 17:25:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E270F6B0071; Thu, 5 May 2022 13:25:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD6916B0073; Thu, 5 May 2022 13:25:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C50706B0074; Thu, 5 May 2022 13:25:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B24166B0071 for ; Thu, 5 May 2022 13:25:58 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 850A46232E for ; Thu, 5 May 2022 17:25:58 +0000 (UTC) X-FDA: 79432367196.20.0C41DF7 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by imf14.hostedemail.com (Postfix) with ESMTP id 6DB1710008E for ; Thu, 5 May 2022 17:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651771557; 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: in-reply-to:in-reply-to:references:references; bh=tT2BrC5wtpY98Xyl4U1QZDUp/OCUTw1Ys8ss+GOAfFE=; b=IqXg+5hND66iCJuST0xzf5R+cyJ5uwKG9x2NpB8eCb1GCNi/7E2ZGPwCGJvfIV6l5NsXvT znNyWixF6X1IWMjbENb5WbD57v1yVcX17Cr8iXqesv9miT0RG2gOYUxgi5b76+W0JhY2E8 qBeZ/TVt5a6JmPOmsC8YXoJWCkeKkXE= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-145-xddWymosPReBf4QKspcjhA-1; Thu, 05 May 2022 13:25:56 -0400 X-MC-Unique: xddWymosPReBf4QKspcjhA-1 Received: by mail-io1-f71.google.com with SMTP id i66-20020a6bb845000000b00657bac76fb4so3334160iof.15 for ; Thu, 05 May 2022 10:25:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tT2BrC5wtpY98Xyl4U1QZDUp/OCUTw1Ys8ss+GOAfFE=; b=dsj6Ot1/M7Wa3WV33Y9tzoaF2oMLOI9a0DyknnWhEUpKlk2MfxqQpCJ7yDkS15OYjE ggLWx5wCUsOnVsAIrJgfB6WxDUKwchUo0lSP40VRdzskJKaZs4g/vzapnDf6joFpX0rz UMvXs8+Q5uAgJBI3J3eVqFQHFG7/fRikab1+WUajMmCK4Q4GwiR8AfXsG0smzER7so4m W7Ykm4emtQYrZOdS0WoNF6qDwESkkbinf958oIrUZ5QvhFFsPpBdyc0KrScz/Po6XgB/ TmIRfKajGawMSd2aVR9+q3m161jTwD1x3IqVhMxHQCP04GjiGTNkbhQOrzFP5ISfPJPJ UYkw== X-Gm-Message-State: AOAM532JqwFIa9V6hE5PtNnhP84bWwLtMV/DNDsuQ+MT71fvowjN+aRu ALjndG+mp3hYsk1phFED+tXGn/2SBVpTjbr2UAxfoWUOdVpu1fniPl8NFkgTN1TcFtWkLcJ+kXo URtp9PhCoX0g= X-Received: by 2002:a05:6638:40ac:b0:328:6b81:f9e8 with SMTP id m44-20020a05663840ac00b003286b81f9e8mr11353106jam.153.1651771555622; Thu, 05 May 2022 10:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC+oM9RGzodl9hkJpceUHdPlHK9Zhnz05l6pq0+J+sejC41muNngNg+JonwkN9XxNJwtUZnA== X-Received: by 2002:a05:6638:40ac:b0:328:6b81:f9e8 with SMTP id m44-20020a05663840ac00b003286b81f9e8mr11353103jam.153.1651771555414; Thu, 05 May 2022 10:25:55 -0700 (PDT) Received: from xz-m1.local (cpec09435e3e0ee-cmc09435e3e0ec.cpe.net.cable.rogers.com. [99.241.198.116]) by smtp.gmail.com with ESMTPSA id m2-20020a056e020de200b002cde6e352d4sm589943ilj.30.2022.05.05.10.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 10:25:54 -0700 (PDT) Date: Thu, 5 May 2022 13:25:53 -0400 From: Peter Xu To: Mike Kravetz Cc: Minchan Kim , David Hildenbrand , Andrew Morton , linux-mm , LKML , John Hubbard , John Dias Subject: Re: [PATCH] mm: fix is_pinnable_page against on cma page Message-ID: References: <20220502173558.2510641-1-minchan@kernel.org> <29d0c1c3-a44e-4573-7e7e-32be07544dbe@redhat.com> <08e9855c-395d-f40c-de3d-1ec8b644bfe8@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IqXg+5hN; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf14.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.129.74) smtp.mailfrom=peterx@redhat.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 6DB1710008E X-Rspam-User: X-Stat-Signature: yh6e9bw5781aryknma7aw1nzibd7m79b X-HE-Tag: 1651771556-195200 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 Thu, May 05, 2022 at 10:00:07AM -0700, Mike Kravetz wrote: > Gigantic pages can only be migrated IF there is another (already allocated) > gigantic page available. The routine to try and allocate a page 'on the fly' > for migration will fail if passed a gigantic size. There 'might' be a free > pre-allocated gigantic page. However, if the user set up CMA reserves for > gigantic page allocations it is likely the free gigantic page is also in CMA. > Therefore, it can not be used for this migration. So, unless my reasoning > is wrong, FOLL_LONGTERM would almost always fail for gigantic pages in CMA. I'm probably not familiar enough with CMA, but.. I just noticed that if CMA is destined to not be able to be pinned then maybe it'll lose quite a few scenarios where pinning is a possible use case. It doesn't even need to be the major use case, but as long as it's possible (e.g. hypervisors hosting virtual machines with device assignment) it'll be a hard no to CMA, which seems to be a pity. -- Peter Xu