Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2635223pxu; Mon, 14 Dec 2020 07:22:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcyQ5uv0FfijDwgBS2xphxX1QnZU0NGFvqa3IETa+jZVFdxwYIYRbEMryLlB7UTOiL5E4u X-Received: by 2002:a17:906:4d47:: with SMTP id b7mr22295581ejv.420.1607959335894; Mon, 14 Dec 2020 07:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607959335; cv=none; d=google.com; s=arc-20160816; b=EXIudDaFvg5T/jnrPLnAhdojSjMWezMJPgkvFURxzQ50btcX/SIZ03PvCfBunbY6pJ G87PahxufB7bCmz2F5fkC2wAGB2HuBeFlPNpHBJpyLc+ZPE9+uaEz9tjQQ5ABXWbN4dK SmtSM5rpuAelJukCknSLKhydmmMEZNgZEaRyHxPwsPxnck1A1kqsXVz/1qRrXfSJQYdd gTcsG9+ykHEewhnuYqGv7p/XfZZs6JotesHCazHpHaL/CgnPBPtot0pd19Wro6hji3Du IZ2bOGLjhS0VsYCBZHsXiDY8OeRDxxHgfpBczfkKODfoKPX2pxiwZrAD1foRvkzK/iNT 8Xiw== 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=YFr8Ms8n+yMf7TCzVCFHWfW+5sl9l5Yvwxnekv/jl7Y=; b=gQndfiFE9v9K/2OeKct8qcf7uRxg0Dgpx4WvQ4NUNCBHJYQRxIDIm5jdjZuPrj5wnU BxAGomFntEI5pI1uQ6I1+ds7Y5iJEiXS7GE0MWxm2SAItlD8cl/xGwivXgZgovaYwT+v ySPQcz0rNpce1O83v7iqghaSUXOBrLvDUOwD833tZerUvfSQ6rgK2OcaGEk0GtNK5v1A sDClgMFSa0rZ9SOsAItq6pTpcjG8D0dfyGmee9mi03Cv6boDX1cU0DRJRlMHZiTLFZgL XahdlZ7TPqb0Z2dd3L2WveFoYmQzzEhnfbdx7O0oFX0q9Yw8birdZCYJaLEYj9hFxQew gikA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WnpWdyxm; 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 se25si9883393ejb.82.2020.12.14.07.21.52; Mon, 14 Dec 2020 07:22:15 -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=WnpWdyxm; 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 S2440063AbgLNOVF (ORCPT + 99 others); Mon, 14 Dec 2020 09:21:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:40690 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440043AbgLNOUe (ORCPT ); Mon, 14 Dec 2020 09:20:34 -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=1607955588; 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=YFr8Ms8n+yMf7TCzVCFHWfW+5sl9l5Yvwxnekv/jl7Y=; b=WnpWdyxmNE4MGmYVbWl7dKtXCjSK0mK70qY9mJLamnHb+5QT/+TYnnXvZnI2Av4IXZt4cu E81FE2DyBCKbCtfh+wy8TxCwWtqjF4nA10rhncFEWiwlFFB7TbBjQOuYiCooK0mQWt5AfN 7tfZBVX/MKPmmpsIFZHcMpx3e7AuFE8= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D4570AC10; Mon, 14 Dec 2020 14:19:47 +0000 (UTC) Date: Mon, 14 Dec 2020 15:19:46 +0100 From: Michal Hocko To: Pavel Tatashin Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, jgg@ziepe.ca, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org Subject: Re: [PATCH v3 5/6] mm/gup: migrate pinned pages out of movable zone Message-ID: <20201214141946.GG32193@dhcp22.suse.cz> References: <20201211202140.396852-1-pasha.tatashin@soleen.com> <20201211202140.396852-6-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201211202140.396852-6-pasha.tatashin@soleen.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 11-12-20 15:21:39, Pavel Tatashin wrote: [...] > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index b593316bff3d..25c0c13ba4b1 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -386,9 +386,14 @@ enum zone_type { > * likely to succeed, and to locally limit unmovable allocations - e.g., > * to increase the number of THP/huge pages. Notable special cases are: > * > - * 1. Pinned pages: (long-term) pinning of movable pages might > - * essentially turn such pages unmovable. Memory offlining might > - * retry a long time. > + * 1. Pinned pages: (long-term) pinning of movable pages is avoided > + * when pages are pinned and faulted, but it is still possible that > + * address space already has pages in ZONE_MOVABLE at the time when > + * pages are pinned (i.e. user has touches that memory before > + * pinning). In such case we try to migrate them to a different zone, > + * but if migration fails the pages can still end-up pinned in > + * ZONE_MOVABLE. In such case, memory offlining might retry a long > + * time and will only succeed once user application unpins pages. I do agree with others in the thread. This is not really helping out the current situation much. You should simply fail the pin rather than pretend all is just fine. -- Michal Hocko SUSE Labs