Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp662039yba; Wed, 15 May 2019 07:53:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxdVYMh9/zjDtxV+xK2x9UfhtJiKRD3Md8G0TETHp1DNas1PFJ4VpRawRTWXfwbFPBzgNHf X-Received: by 2002:a63:d343:: with SMTP id u3mr44764819pgi.285.1557932009156; Wed, 15 May 2019 07:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557932009; cv=none; d=google.com; s=arc-20160816; b=CVloeiD3M8Lekv5Twdg+wPhABQ2ZdSAtcxealse8HjuDHWBEQXYHysFPI9ZPLCRHJE x79GfnkE9MnauoIIz3LZWd/1jANGE+sodBDSjPSNmtIgwZLsWa44//vR2FyX5SieskMs ewvpo9Yxd9ohDpt3doLa9GLg09ko8AV4iy/wht6vRLIuyyhGag/oaz3BUEEHelGrtQ1x t+XJMxzjR0DQdD/cSSI5877ySH9O+QKRYxsxfAOgjiODlC8zffUf+yt8A3rVXd5uocDX WFYgwtNFZrkI86EemGh5wieQLFaYOeyaT58CdeMcmKrMV2TC4YLetYw/WjMpw+r5YZFj 52Pw== 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=hTMYy1EaK3LKS3t54o0/p3Sni3y6a5O4w65M/yOf9YI=; b=Y65QGBO+sDFN2acaGXTfVrxYUuseRyKi7LKqcviSE/YMEjHPk1Ivo0G3ie+EPKJGSf UTj1zWjXisiOJAf/sYrCN+wjUe9PzdsOZezhcGBmzqMzbL7oQqyRWeJXoBGbqCGt6QJB zRzvl8rWvkZEeBqz5aGYm9sMZQc9gGU/cW3JHuRYjFQOs4FYZiFvuejYH32QDQr7hlYl zqNOgAcRu80pt3lVc6nXyzV1IHNMeAxFBsGO3ZIr9h7jyCuVGEEK4OelmF7NuybaBUFP cPWhoH+gwTsMWAfis1MJwj19bbRpdNXPL08/aqiGnfbkqtt+6/A92TO0+iPbvJt0VJS6 5kAg== 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 s21si1999263pgk.139.2019.05.15.07.53.14; Wed, 15 May 2019 07:53:29 -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 S1728350AbfEOOv4 (ORCPT + 99 others); Wed, 15 May 2019 10:51:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:51410 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727336AbfEOOvz (ORCPT ); Wed, 15 May 2019 10:51:55 -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 281DAAFDD; Wed, 15 May 2019 14:51:53 +0000 (UTC) Date: Wed, 15 May 2019 16:51:51 +0200 From: Michal Hocko To: Oleksandr Natalenko Cc: linux-kernel@vger.kernel.org, Kirill Tkhai , Vlastimil Babka , Matthew Wilcox , Pavel Tatashin , Timofey Titovets , Aaron Tomlin , Grzegorz Halat , linux-mm@kvack.org, linux-api@vger.kernel.org, Hugh Dickins , Suren Baghdasaryan , Minchan Kim Subject: Re: [PATCH RFC v2 0/4] mm/ksm: add option to automerge VMAs Message-ID: <20190515145151.GG16651@dhcp22.suse.cz> References: <20190514131654.25463-1-oleksandr@redhat.com> <20190514144105.GF4683@dhcp22.suse.cz> <20190514145122.GG4683@dhcp22.suse.cz> <20190515062523.5ndf7obzfgugilfs@butterfly.localdomain> <20190515065311.GB16651@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190515065311.GB16651@dhcp22.suse.cz> 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 [Cc Suren and Minchan - the email thread starts here 20190514131654.25463-1-oleksandr@redhat.com] On Wed 15-05-19 08:53:11, Michal Hocko wrote: [...] > I will try to comment on the interface itself later. But I have to say > that I am not impressed. Abusing sysfs for per process features is quite > gross to be honest. I have already commented on this in other email. I consider sysfs an unsuitable interface for per-process API. Not to mention this particular one is very KSM specific while the question about setting different hints on memory of a remote process is a more generic question. As already mentioned there are usecases where people would like to say that a certain memory is cold from outside of the process context (e.g. monitor application). So essentially a form of a user space memory management. And this usecase sounds a bit similar to me and having a common api sounds more sensible to me. One thing we were discussing at LSFMM this year was a way to either provide madvise_remote(pid, addr, length, advice) or a fadvise alternative over /proc//map_vmas/ file descriptors (essentially resembling the existing map_files api) to achieve such a functionality. This is still a very rough idea but the api would sound much more generic to me and it would allow much wider range of usecases. But maybe I am completely wrong and this is just opens a can of worms that we do not want. -- Michal Hocko SUSE Labs