Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4797914ybi; Tue, 28 May 2019 02:41:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWuPDFVFvvsINMt8zlOgEnt3KDbYbDr1nDB0N0lJGh43Ee65CwU70gk1APMhbrif0XJxxD X-Received: by 2002:a17:90a:bf01:: with SMTP id c1mr4624521pjs.78.1559036499030; Tue, 28 May 2019 02:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559036499; cv=none; d=google.com; s=arc-20160816; b=PPr2uk4MByCZmFkkECyRjGsahQOLXSbrMYKavVunTMTZA2q/iB8hZBpnXWvYQo3Ukb gTQGrFeKu+F4ZOpyvY1NKu1kjEmJGgrFusqU0FlKQLMHVIV8YnspZ/lPjnbdZx+tEaI/ K2st34HDlL7hAOjvoszO0IaBXsRPJkcEQy9LVqnvEc3NZ4uj7kIqwUHHDFQn9w9JhWNe 2ux5mFmcE0OJgdQ2nJUhhRJ4Svy0FAFoQWpeMq7I3GszVox4YF9UN5i9+91HxpE1ZdQI rCksszgBKunTBoP3qf34HzvwB/HDprA0I63nvIYBSjeWmj3799UvypuYmJ2lRXwVFAAC Mi0A== 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=nDpCbodGGyTl/G0ilhTF0HY0iZvF6dtHic3QCj90ipM=; b=F5MNemNccNcYnn1ieDxRiGtYnMAH7SMRrehHrPuT5QYJuB4hb+RvUp2RRCHlDA5b+8 8fbVJJIkDFNH3c8waQ00fBzr5uL8ma47xBqm17bBTzEOOevZZk4srGBzoxZACeyB0lqi NJWNZduRe51lJ7rCiqJCj16Tr7pPTa45pfH1AFtEcWzsW6MbZf/9MGfUgZamRGmCM2qw FI6bmBjf4F3dlzlcD4o1IgfIuAec5QmYAldyBCn+0+OG2O5mewHVUfgskf5axL5Z2tzn G4Rfv1hVH1T+oe5xUkQEbQ54ui3Pa6QzRt6hlwyJ5f76go2VTx18qNQnyVjCg2bUu+9L EZ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=oZXsDC13; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4si20139703pgg.49.2019.05.28.02.41.23; Tue, 28 May 2019 02:41:39 -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=@google.com header.s=20161025 header.b=oZXsDC13; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726713AbfE1Ib0 (ORCPT + 99 others); Tue, 28 May 2019 04:31:26 -0400 Received: from mail-vs1-f54.google.com ([209.85.217.54]:41520 "EHLO mail-vs1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726532AbfE1IbZ (ORCPT ); Tue, 28 May 2019 04:31:25 -0400 Received: by mail-vs1-f54.google.com with SMTP id w19so12239156vsw.8 for ; Tue, 28 May 2019 01:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nDpCbodGGyTl/G0ilhTF0HY0iZvF6dtHic3QCj90ipM=; b=oZXsDC139BFCteWhHBnBHACBOyQMeYRAOrZf/VJ9wS/tQrz+S5esMvP0w8pm449GB0 cmPfZW9ULRdT8n87/iMLMqbXXoNT2419ayfmemKqxIJh/KqXliDTTIoDy/JJkTCzYryx iIlEjh1oNEoJ4CStLL3ikYedgGLSj31O/YU1e5WlFayKAu5dl4Cfe9sAOMTSo6ok56dv SscPem+FZ6pZKojuqiPTl9gCzY8bvmH3jPqX75TAYNEMn8ednqktRfMImHunEbKtoRUv Lf1i1JxgNOSbcFvnNzWMo0/z3X2u7Op2IXl1Rdo2AYwyzRhLvuUtMZjXo6ABqCq7Hxjt u1EA== 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=nDpCbodGGyTl/G0ilhTF0HY0iZvF6dtHic3QCj90ipM=; b=NyuGtkO4Lo7EHo1DvDTsmw5+A2VtsgbZ9LG3bsJuouD+YfIfbjtuWR9HowzXyM9FCN v322aWF823HnhtYbvLQX5vVOFm6bpIIfeCaImkugHEq+d2vMUvERpXhil5NP6SATLJoa rpGaXG4rNFL19RATnjTHC5DJyAS01xZiLiP1TOiOlUsmk35b0nsEVqLMWlYwToeYrOFv nKGMnSofOulUCAyxJV3yj6WRk0FBYnTm87pjjKIcgkB5pG+kng9UR7ew8MSLXn5+1/Lp yzKiwgXEJzKfUgXZXtfRK/NOAs7npLFio9s23NicQkYlQrnmWU7bJsv5HsV6CVcl4GqD gNOA== X-Gm-Message-State: APjAAAXBLF8Gh0hBmwrT2zAGKkXcFyz5xdsJmzk0tT6e/wbGB6X6zkEB zLjtrp+eWSDHoeBAfqwoh8hGBN7lKpzZeex7FOeKzA== X-Received: by 2002:a67:e1d3:: with SMTP id p19mr60303726vsl.183.1559032284339; Tue, 28 May 2019 01:31:24 -0700 (PDT) MIME-Version: 1.0 References: <20190520035254.57579-1-minchan@kernel.org> <20190520035254.57579-8-minchan@kernel.org> <20190520092801.GA6836@dhcp22.suse.cz> <20190521025533.GH10039@google.com> <20190521062628.GE32329@dhcp22.suse.cz> <20190527075811.GC6879@google.com> <20190527124411.GC1658@dhcp22.suse.cz> <20190528032632.GF6879@google.com> <20190528062947.GL1658@dhcp22.suse.cz> <20190528081351.GA159710@google.com> In-Reply-To: <20190528081351.GA159710@google.com> From: Daniel Colascione Date: Tue, 28 May 2019 01:31:13 -0700 Message-ID: Subject: Re: [RFC 7/7] mm: madvise support MADV_ANONYMOUS_FILTER and MADV_FILE_FILTER To: Minchan Kim Cc: Michal Hocko , Andrew Morton , LKML , linux-mm , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Shakeel Butt , Sonny Rao , Brian Geffon , Linux API 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 Tue, May 28, 2019 at 1:14 AM Minchan Kim wrote: > if we went with the per vma fd approach then you would get this > > feature automatically because map_files would refer to file backed > > mappings while map_anon could refer only to anonymous mappings. > > The reason to add such filter option is to avoid the parsing overhead > so map_anon wouldn't be helpful. Without chiming on whether the filter option is a good idea, I'd like to suggest that providing an efficient binary interfaces for pulling memory map information out of processes. Some single-system-call method for retrieving a binary snapshot of a process's address space complete with attributes (selectable, like statx?) for each VMA would reduce complexity and increase performance in a variety of areas, e.g., Android memory map debugging commands.