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 X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD58FC4361B for ; Mon, 14 Dec 2020 14:19:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4826822BEF for ; Mon, 14 Dec 2020 14:19:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4826822BEF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 709CE6B0072; Mon, 14 Dec 2020 09:19:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BAD96B0073; Mon, 14 Dec 2020 09:19:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D0886B0074; Mon, 14 Dec 2020 09:19:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 432C56B0072 for ; Mon, 14 Dec 2020 09:19:50 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E7AEE362E for ; Mon, 14 Dec 2020 14:19:49 +0000 (UTC) X-FDA: 77592096498.30.town06_38148222741b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id BE32F180B3C83 for ; Mon, 14 Dec 2020 14:19:49 +0000 (UTC) X-HE-Tag: town06_38148222741b X-Filterd-Recvd-Size: 3259 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Dec 2020 14:19:49 +0000 (UTC) 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> 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 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