Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1987715pxu; Fri, 18 Dec 2020 02:49:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3x6ONHXcY5D+UehfLJbiVhQTcoJCTjVCrWMxvpnArdqW5iy1fVSepoGJByaB4umE9agA6 X-Received: by 2002:aa7:d6c9:: with SMTP id x9mr3697849edr.96.1608288558127; Fri, 18 Dec 2020 02:49:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608288558; cv=none; d=google.com; s=arc-20160816; b=puArmvtzt/iRCGID665wkOkYp5QDh3BPvM2/QH3kHZb3jf0c1jj6FFL4HVxdQaYWIQ Ah4FUyUKK6vM28/ljR5rNi8IkugAgvHjqvuwly6V81wLzpyBH3ipaQBfrWMYkqGnZ4Px k8vSCLZQ6/LLPzoh6+NOIynFiNLLbfPM0122nx4XI2GT/hLL3x05L7h6dMLl9zmkVd23 Obwg9+z/0jXUfW+QEjLDuazPESxUG2gKGDToBThyMID5frbmqLCZXiSU9Jme5kLvkdda BIq67j3gmy1pFDbdx91unJPKewg6gUiGoDu2eOlMtR52GtkCVmhCuNrSbpBcYwgfx+AQ 4MrQ== 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=3swyT71jdbCCI5HZXDPvWCHg/P1y67H2zIpHLs3RIh4=; b=Z3ubzpKtqc6OHhsXKIJBSs5WF7DtibiJtiP3glm6XIkFazpiiiTRHQjhlkZLNB8tJW NkKbRZBKh3EDqZDj9CBAPRAy6GjKUk3lMSs2JAO4ogqb64o/CHaEq4/F1Vexj4gjRayL w7iLnoMZegEgSOkUoEP0oie4R5iOGP81dj5JuIWDA+8zeAf5zUf7hhYs9MJQDw7XQc0u nCRcpRVZMR8pfqy05U2SZ2NCKx4t4inSDwE7bK7Plqw5ZTEKfBHMbZZc8S3ymS4RwWd6 Rln9w6pP28G+8WQ1BUbHddV+SI3z9GeP3N/tUHjys9vqH0YE/Rb9TqIki2aeTLj58fzt 9/NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SV1UffwU; 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 x17si4387021ejw.478.2020.12.18.02.48.55; Fri, 18 Dec 2020 02:49:18 -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=SV1UffwU; 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 S2389152AbgLRKrp (ORCPT + 99 others); Fri, 18 Dec 2020 05:47:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:37526 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389108AbgLRKro (ORCPT ); Fri, 18 Dec 2020 05:47:44 -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=1608288418; 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=3swyT71jdbCCI5HZXDPvWCHg/P1y67H2zIpHLs3RIh4=; b=SV1UffwU9XB43+pLJFmwrqvNHdW93HO+IKZcHSRIDRHPmIuFj3PIr/zSUQU2nUkxTjkpJR xlWtBd3EMc17CFEk6RjXmwkuhfkql4ZnNn7tIlb2gDIHdQOV7b6g6Uu3PvBRSqFl4vrvux atuGslIivJVgEGK9baTbWT3CH3YieV0= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 36198ACF9; Fri, 18 Dec 2020 10:46:58 +0000 (UTC) Date: Fri, 18 Dec 2020 11:46:55 +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, ira.weiny@intel.com, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 08/10] mm/gup: limit number of gup migration failures, honor failures Message-ID: <20201218104655.GW32193@dhcp22.suse.cz> References: <20201217185243.3288048-1-pasha.tatashin@soleen.com> <20201217185243.3288048-9-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217185243.3288048-9-pasha.tatashin@soleen.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 17-12-20 13:52:41, Pavel Tatashin wrote: [...] > +#define PINNABLE_MIGRATE_MAX 10 > +#define PINNABLE_ISOLATE_MAX 100 Why would we need to limit the isolation retries. Those should always be temporary failure unless I am missing something. I am not sure about the PINNABLE_MIGRATE_MAX either. Why do we want to limit that? migrate_pages already implements its retry logic why do you want to count retries on top of that? I do agree that the existing logic is suboptimal because the migration failure might be ephemeral or permanent but that should be IMHO addressed at migrate_pages (resp. unmap_and_move) and simply report failures that are permanent - e.g. any potential pre-existing long term pin - if that is possible at all. If not what would cause permanent migration failure? OOM? -- Michal Hocko SUSE Labs