Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1595301ybi; Thu, 20 Jun 2019 00:09:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxC4eRokiAqM7HNuxl9/rVYSAYRUHfSnV1POgmToDiostsCnD+iyFFbBMHXGwpcjfxl3J1k X-Received: by 2002:a17:90a:cb18:: with SMTP id z24mr1519078pjt.108.1561014557165; Thu, 20 Jun 2019 00:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561014557; cv=none; d=google.com; s=arc-20160816; b=cSElqrFU13BuMcphH21quywQjnv3x9/gLD2xaByDgYKLSmDUvyZ3UKunJ0Q98XnGEN Q88DtqJTdt2l17yEVwu1ss8ZlpupH1jVIu55ng3P6utDuTrtSHzRbs2DGVGb+lD3XsuS B+VSC+0Qsdhfr3tCWXbI2WRCOgx/UXBaRCf+rF+Odu3wSBPitw+tKETv4StlkuaOtzSi vUbVu1ifXvoCAvIvtT4wAUShr2FgkJqimWW26e9XLedqcnJHFGuBdhwW7d593PWdoZgf +K+vi2RfA4sTbQ38fSfr5xZoOskao5Tvg59FR9Oi/4vHuY4CorgaVfK+FnznyI/hIaH5 kn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Rk+vCv5pTjlB6mJr9WQfKgVUUf/TX6MAy/OWqhY87AQ=; b=VPyzWfjSc9GAjTqYSHJUpUR/g+3wT4if0cV1VeYc0okl+AQI1u8kjskYgGfhlxhPSW bBGF1+en2UhTI02oEmWBEuofc4gzflI5xIzVb2oNRNYpwM9ds/zme77HJVMWcnh+T27d yMCJkUn2LSpLC75iSyQSUWuMxo+hoT+p+03bm2aOeq/9l1aJerEiJg6AwqIUn78I6M9Z Qo5XGoJEmkhC57UtoeWejvwcOIki9UuaAIDLzPpO/gJxfgi/NXE42ztkBwYjq2mx+EEX 85J53VPtdoyymwn/0TRhsMJDvs1Z1myWQ+st6wvopByZCl6B2fHXqoDMvKe7aiA7Hmq9 xWuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s36si4907904pld.164.2019.06.20.00.09.01; Thu, 20 Jun 2019 00:09:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726652AbfFTHI5 (ORCPT + 99 others); Thu, 20 Jun 2019 03:08:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:43926 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725872AbfFTHI5 (ORCPT ); Thu, 20 Jun 2019 03:08:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C31BEAE34; Thu, 20 Jun 2019 07:08:55 +0000 (UTC) Date: Thu, 20 Jun 2019 09:08:54 +0200 From: Michal Hocko To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , linux-api@vger.kernel.org, Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon , jannh@google.com, oleg@redhat.com, christian@brauner.io, oleksandr@redhat.com, hdanton@sina.com, lizeb@google.com Subject: Re: [PATCH v2 1/5] mm: introduce MADV_COLD Message-ID: <20190620070854.GC12083@dhcp22.suse.cz> References: <20190610111252.239156-1-minchan@kernel.org> <20190610111252.239156-2-minchan@kernel.org> <20190619125611.GO2968@dhcp22.suse.cz> <20190620000650.GB52978@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190620000650.GB52978@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 20-06-19 09:06:51, Minchan Kim wrote: > On Wed, Jun 19, 2019 at 02:56:12PM +0200, Michal Hocko wrote: [...] > > Why cannot we reuse a large part of that code and differ essentially on > > the reclaim target check and action? Have you considered to consolidate > > the code to share as much as possible? Maybe that is easier said than > > done because the devil is always in details... > > Yub, it was not pretty when I tried. Please see last patch in this > patchset. That is bad because this code is quite subtle - especially the THP part of it. I will be staring at the code some more. Maybe some simplification pops out. -- Michal Hocko SUSE Labs