Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2106960pxu; Fri, 18 Dec 2020 05:49:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNKrHdBSSBueu7EkjyJwoj9aqKw5eoVrLwuCoeWzufDotvIz1U+eW5mQMcDdoOVhEitt/o X-Received: by 2002:a17:906:85cd:: with SMTP id i13mr4099495ejy.553.1608299387516; Fri, 18 Dec 2020 05:49:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608299387; cv=none; d=google.com; s=arc-20160816; b=pTkiR0k/mVGA8RFn+qtxV8Dkdo4yi8qbSrNuXFQLZ288UcpHE8PScZ2MrZVcY3z3iI hVGAvbBdIUTaBBaSKdNyIq0vqW7zT1nccVJ4fI8rFkSxhw11Pnw0VSA6r2qJnwfAybk8 gba7gXjWMcqIPOGFUj72LpVDGeDn+ap40qQdvpdMKHD0toffsuPwXnJaIOn19pUSKhKq E7tDvBZcGZp2FGb2vaVOpCrMGYT98IS5EWCy/8xbfYgm0k70HKb9EHq+EUdjI/QzDRiE rllXYoy8HcHp0cFiipKRkeH9bL/mB5s1ts6KpDYBc+A3G0ncGBrARTdCsl4fjaIFz+pL wn0A== 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=Qy4X5XGLkjjTrEVnpyl9ubxnV3suDoRLMs36eWY7vx8=; b=zUwLCYUwkP91HmLgDe4+qiUXtHZ3pL5FCsf9jaatcff7Vu5150aDOwWkJZM+S9lTQm N4+bvs74gE9voKRvDTTR77vvsRW689Q+GkjgwWs8Ud4Ta7KpxrKKkZtY+3h14ksks16p naBHadHbFKVvjvky4y3n3cdIwQJOBfMx0zRVzxLDe2U5KwvzUInx212MdXzYJX7iHeEa F8BjoVr13MxZbVBXlwSaKFlEilnEbwxM1zOB20euFA6Rm9X01wmfkNOb36gEKR9m0rd6 41huE/8yCs3uWQUfhJ9AFikMeB1nyKPwLMpinHkZGP0UDVf0/txaF24dfRoX6ZmpnWIQ voKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="l76U/9Q6"; 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 c26si6268473edv.182.2020.12.18.05.49.25; Fri, 18 Dec 2020 05:49:47 -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="l76U/9Q6"; 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 S1727230AbgLRNJR (ORCPT + 99 others); Fri, 18 Dec 2020 08:09:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:37320 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgLRNJR (ORCPT ); Fri, 18 Dec 2020 08:09:17 -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=1608296911; 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=Qy4X5XGLkjjTrEVnpyl9ubxnV3suDoRLMs36eWY7vx8=; b=l76U/9Q65OcRVxpjlhkrgzoI2O/GDE06QXEjmSrmOHTqE5Ih/2RQ1jIJG3bjvK1Y4ex2xq 8pw6RsXn2ZB7Oz9oWRONm2eAbpAwKQ3j3FevprsLmFtW13S9DlYK7cs6WEppEQvMHf0q36 xyYXBCkFyyT6u01tptEnHUwdGs/ZD60= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 819A5AEBE; Fri, 18 Dec 2020 13:08:30 +0000 (UTC) Date: Fri, 18 Dec 2020 14:08:25 +0100 From: Michal Hocko To: Pavel Tatashin Cc: LKML , linux-mm , Andrew Morton , Vlastimil Babka , David Hildenbrand , Oscar Salvador , Dan Williams , Sasha Levin , Tyler Hicks , Joonsoo Kim , mike.kravetz@oracle.com, Steven Rostedt , Ingo Molnar , Jason Gunthorpe , Peter Zijlstra , Mel Gorman , Matthew Wilcox , David Rientjes , John Hubbard , Linux Doc Mailing List , Ira Weiny , linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 05/10] mm/gup: migrate pinned pages out of movable zone Message-ID: <20201218130825.GY32193@dhcp22.suse.cz> References: <20201217185243.3288048-1-pasha.tatashin@soleen.com> <20201217185243.3288048-6-pasha.tatashin@soleen.com> <20201218094324.GT32193@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 18-12-20 07:24:53, Pavel Tatashin wrote: > On Fri, Dec 18, 2020 at 4:43 AM Michal Hocko wrote: > > > > On Thu 17-12-20 13:52:38, Pavel Tatashin wrote: > > > + * 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 still dislike this. Pinning can fail so there shouldn't be any reasons > > to break MOVABLE constrain for something that can be handled. If > > anything there should be a very good reasoning behind this decision > > documented. > > This is basically current behaviour, after patch 8, we can never pin > pages in the movable zone, so I will update this comment in that > patch. Then it would be much easier for review to state that the existing behavior is unchanged and do not update this comment just to remove it in a later patch. Because this patch should be straightforward change of the condition which pages to migrate (+some renaming which should be reasonably easy to follow). Maybe it would be even better to do the renaming separately without any functional changes and make only the change in the condition here. -- Michal Hocko SUSE Labs