Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2088951ybi; Thu, 20 Jun 2019 08:57:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEZWb0TjP7miAc6xC/J7rLho6EnWn7VJH5h/Xc2MJhFL4uDsgeggEi9z7LIqysM22xF3Nh X-Received: by 2002:aa7:91c5:: with SMTP id z5mr39461572pfa.34.1561046269460; Thu, 20 Jun 2019 08:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561046269; cv=none; d=google.com; s=arc-20160816; b=ctrvFz2Vvw9kKHgEVR7wug8xDd9rzMIkr5N7LKkP+Er3haqGHjpw1TEjLdhm9h7o19 Z8lLISV9G6uFshqKVRxT3phl/ynl4aK6P8ne0Yg7LFE+kvhbvgQd8n1Ra5NqwWaeCwfV 0vQVS3fvBHhR32jJ5W1dgJ5Ls4YkPTxkZYZ0A+zuT7FTIW7KHugQSw7SJSRZ8ANoihE8 c9Ia087BSeTfUQGHQQk9RjoQAlh0LKacn8nFPhE8gez6h4E+qydVJipV9kvsYbi19XPP 97bk/rOYTXzpwtr6x24AZnvVRinAqcSWF8ikYtAT2MKw3ael8WoflYGptEZH3s/8mRqy mxrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jWGyLei7iIX0YquCcpJVdvUVmyD9HHcydfLdWLV6VdQ=; b=vbN332TavdYACnwbeNG0bDYW7TRXSKMHKt7009zI/ZsO6cqWrNwU/sn7mQrpNBVHhn sPLcyJ5/tPq1dliMz+NyNEHM99i/K4O/KG5k+SRFXedD9NMr3fCHmQRA2TpCqOdVUgOL DKklwccxFwRJDWpvHa7Hdu26j7H/aXZ2TNN/iyEXJ/oaUIa0aKkI+oBTGyjOsUGMHY1h ZZFCupWCHB1x8WdqibW7Zf9ZGgw33J7gPZIO5Jpyf+fbosUpItnqgLQx7WkikwKkey7I rEUu/MFOxf8Q7F4arWsTI+wXUB/9cIXOONJWvcAvM1WKcAubX3hnhEhTiainex320LG4 kZeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=bFe5M5Vi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si20525885pfc.237.2019.06.20.08.57.34; Thu, 20 Jun 2019 08:57:49 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=bFe5M5Vi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbfFTP5X (ORCPT + 99 others); Thu, 20 Jun 2019 11:57:23 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33360 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbfFTP5X (ORCPT ); Thu, 20 Jun 2019 11:57:23 -0400 Received: by mail-lj1-f195.google.com with SMTP id h10so3232192ljg.0 for ; Thu, 20 Jun 2019 08:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jWGyLei7iIX0YquCcpJVdvUVmyD9HHcydfLdWLV6VdQ=; b=bFe5M5Viz6mhTHKLXiMPTsQHKWSneXU/P32CqJMYYaptrO+yxI3A5ZHrwgrV2u0KS5 rMgI+Roe2+x3nxcZJ1pksI2BGPwWFMRIupONO1kQiB3020Q2Rgino0w1y37GLCitolpZ audrqCWFZ8YkyqtOjHihYhu0nEmriemTSSrqQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jWGyLei7iIX0YquCcpJVdvUVmyD9HHcydfLdWLV6VdQ=; b=Ypt8zydfKNu08edY6eBbeqOImPsqTqFtLiMaGWZ38aFNelZfDgS9IlEWVYYoi3263m RKbM3uO7Q/2oMAvc7/77aO2aUYHfrWKANcJ8SY/GIaAi9U1YAeuAmfmPzEf28U1/FzSu /GJy3PTu2FNsy3pmNpqJ7dnBsqojMgJuDimuFBmPSejln5z0Jb6vx79/YW2v89TgiW/P hlRmBd045vp3rn9XLDGtWTbdNm8BotdbkN/bffTNCa3UTR8R7fhc1DcsKBQXluzVfhTK YzSrOVHwg8TBX2rHR2NzEjj6cjZ8iZomoXI+Rv0qO8oRiAQC/NDyGP1/9YsztBUrgXnx Ye0A== X-Gm-Message-State: APjAAAUPbWUjNf8POhNa1c8DvfvbUKP0KVIW4XhBjZ/ErAc1FeBGuk19 kzdoryYp7VoM7vzcP2AhuXqBm8GXnuW1NXBdIpFduA== X-Received: by 2002:a2e:3602:: with SMTP id d2mr7778406lja.112.1561046240877; Thu, 20 Jun 2019 08:57:20 -0700 (PDT) MIME-Version: 1.0 References: <20190603053655.127730-1-minchan@kernel.org> <20190603053655.127730-2-minchan@kernel.org> <20190604203841.GC228607@google.com> <20190610100904.GC55602@google.com> <20190612172104.GA125771@google.com> <20190613044824.GF55602@google.com> <20190619171340.GA83620@google.com> <20190620050132.GC105727@google.com> In-Reply-To: <20190620050132.GC105727@google.com> From: Joel Fernandes Date: Thu, 20 Jun 2019 11:57:09 -0400 Message-ID: Subject: Re: [PATCH v1 1/4] mm: introduce MADV_COLD To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Linux API , Michal Hocko , Johannes Weiner , Tim Murray , Suren Baghdasaryan , Daniel Colascione , Shakeel Butt , Sonny Rao , Brian Geffon , Jann Horn , Oleg Nesterov , Christian Brauner , oleksandr@redhat.com, hdanton@sina.com, Vladimir Davydov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 20, 2019 at 1:01 AM Minchan Kim wrote: [snip] > > > > > > > > I think to fix this, what you should do is clear the PG_Idle flag if the > > > > young/accessed PTE bits are set. If PG_Idle is already cleared, then you > > > > don't need to do anything. > > > > > > I'm not sure. What does it make MADV_COLD special? > > > How about MADV_FREE|MADV_DONTNEED? > > > Why don't they clear PG_Idle if pte was young at tearing down pte? > > > > Good point, so it sounds like those (MADV_FREE|MADV_DONTNEED) also need to be fixed then? > > Not sure. If you want it, maybe you need to fix every pte clearing and pte_mkold > part, which is more general to cover every sites like munmap, get_user_pages and > so on. Anyway, I don't think it's related to this patchset. Ok, I can look into this issue on my own when I get time. I'll add it to my list. No problems with your patch otherwise from my side. -Joel