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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 8BF6DC32771 for ; Thu, 23 Jan 2020 01:43:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5B2832465B for ; Thu, 23 Jan 2020 01:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579743801; bh=pbV8L57NJMLaJwFWTDrasYkVxAEkXQ2z8toB7ZPCci4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Ljnk1Cxp41kVLFcAy3Y0jtO/f++rrsCK7LliDoT0iPu5fuTyKbljyPfpw1PKM274W q9nv94JfgGtUJZeKY5jZM6N+4IUH1AVlGPtOThUwF0t/32pXK5uBC+muQb4AM89MLj ptr4CK0pm3nMqdZmRa2D8H5/XJO22XbpUZ3DBsZA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726911AbgAWBnU (ORCPT ); Wed, 22 Jan 2020 20:43:20 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:55983 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbgAWBnU (ORCPT ); Wed, 22 Jan 2020 20:43:20 -0500 Received: by mail-pj1-f66.google.com with SMTP id d5so417234pjz.5; Wed, 22 Jan 2020 17:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nA4RMqX5haJ1ua8Yhgc4HIMDyOGoyPdaKIKHYrYlVmk=; b=BhHdW1DPSWyzW2/+yWG5oEft9hG4f7HTQrTpV1jtz96GioQx6Jnb4tHm5qGNgoDSVH uYpR1N7Tc+PiZNplBbA1oCeZ0OiTJK0J++qRoXnOg3SricR9U9+ZE73Cd3IIYhGdpWF6 8Bl7Z0CXf2tb0hOow02SnKKKEOloD270mzLEUYrs6LLI1PELah9c9bWMUSDtOMUVF97R NsUjuCSfOjnthdeM3+o2NzmzpRSBq+8qaxwXf/HhrFmrE89nm+btgUWZWPRfjWX5M2ZF /9O3yUQ/8jVHBXLs9vG+yYqki6/hf1T1Q3ilAel8jdza6GzUuCdtx7fWp/To/d+2veBK uKOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=nA4RMqX5haJ1ua8Yhgc4HIMDyOGoyPdaKIKHYrYlVmk=; b=FwhSSun40VVCHTKi4lzHGP43G95m75+5hX3855agWziLyazpkoFBwUu4qSvx7BPlob QciJq2DaT2VzkgRhSj9iG5ESfhdWwWLmJBsu/Y5KH5nLHh7gePiDwyEm+x5fsaVG6JoD RE9YXy/J8hsd/hLX1zdi2uXpYs5/6GUg+kde+c1jou2NpHYTn00NWJf+/vrQA3+vK8ZF tEJPfZ09tON/eMnTipTWQPmfLwTNdkxtikDkHkbzuT/lE7DjA28xQdjvljq4ky5df66z iIPhH9Sy1sock1J5iH4gBsLGG2aimWWGD4VSBA1kJsJFSQfk/Ynf7mdk5iESWY3QxJo8 P1Hg== X-Gm-Message-State: APjAAAUvx7Sh0nGWSJOa/ymLBJyFE/AdPEiSaGYOWtz+pNl7XgRtAMJp KS8k7G71zeDK5CwCkZWddYAMyHDw X-Google-Smtp-Source: APXvYqzq1S4H4X9XLJt3DcWAS97wjkB2xs3kqJ7LItoh0aaUXnndPh+1V3NJYWlsEx82aRhUkp6bBw== X-Received: by 2002:a17:90a:300b:: with SMTP id g11mr1583571pjb.123.1579743799340; Wed, 22 Jan 2020 17:43:19 -0800 (PST) Received: from google.com ([2620:15c:211:1:3e01:2939:5992:52da]) by smtp.gmail.com with ESMTPSA id j17sm199787pfa.28.2020.01.22.17.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 17:43:18 -0800 (PST) Date: Wed, 22 Jan 2020 17:43:16 -0800 From: Minchan Kim To: Oleksandr Natalenko Cc: "Kirill A. Shutemov" , Michal Hocko , Andrew Morton , LKML , linux-mm , linux-api@vger.kernel.org, Suren Baghdasaryan , Tim Murray , Daniel Colascione , Sandeep Patil , Sonny Rao , Brian Geffon , Johannes Weiner , Shakeel Butt , John Dias , ktkhai@virtuozzo.com, christian.brauner@ubuntu.com, sjpark@amazon.de Subject: Re: [PATCH v2 2/5] mm: introduce external memory hinting API Message-ID: <20200123014316.GB249784@google.com> References: <20200116235953.163318-1-minchan@kernel.org> <20200116235953.163318-3-minchan@kernel.org> <20200117115225.GV19428@dhcp22.suse.cz> <20200117155837.bowyjpndfiym6cgs@box> <20200117173239.GB140922@google.com> <20200117212653.7uftw3lk35oykkmb@box> <20200121181113.GE140922@google.com> <20200122104424.7gvrfivymjvdous4@butterfly.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200122104424.7gvrfivymjvdous4@butterfly.localdomain> 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 Wed, Jan 22, 2020 at 11:44:24AM +0100, Oleksandr Natalenko wrote: > Hello. > > On Tue, Jan 21, 2020 at 10:11:13AM -0800, Minchan Kim wrote: > > > > I also think people don't want to give an KSM hint to non-mergeable area. > > > > > > And how the manager knows which data is mergable? > > > > Oleksandr, could you say your thought why you need address range based > > API? > > It seems I've overlooked an important piece of this submission: one > cannot apply the hint to all the anonymous mapping regardless of address > range. For KSM I'd rather either have a possibility to hint all the > anonymous mappings, or, as it was suggested previously, be able to iterate > over existing mappings using some (fd-based?) API. Thing is how you could identify a certan range is better for KSM than others from external process?