linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Petrucci <vpetrucci@gmail.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Frank van der Linden <fvdl@google.com>,
	Zhongkun He <hezhongkun.hzk@bytedance.com>,
	corbet@lwn.net,  akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  linux-api@vger.kernel.org,
	linux-doc@vger.kernel.org,  wuyun.abel@bytedance.com
Subject: Re: [RFC] mm: add new syscall pidfd_set_mempolicy()
Date: Wed, 12 Oct 2022 07:34:06 -0500	[thread overview]
Message-ID: <CAEZ6=UOA6=ikSdxN662xyhT3wauGuqZReKLOb=_9EmSRckNr=Q@mail.gmail.com> (raw)
In-Reply-To: <Y0XEAUD9Ujcu/j8y@dhcp22.suse.cz>

> Well, per address range operation is a completely different beast I
> would say. External tool would need to a) understand what that range is
> used for (e.g. stack/heap ranges, mmaped shared files like libraries or
> private mappings) and b) by in sync with memory layout modifications
> done by applications (e.g. that an mmap has been issued to back malloc
> request). Quite a lot of understanding about the specific process. I
> would say that with that intimate knowledge it is quite better to be
> part of the process and do those changes from within of the process
> itself.

Sorry, this may be a digression, but just wanted to mention a
particular use case from a project I recently collaborated on (to
appear next month at IIWSC 2022:
http://www.iiswc.org/iiswc2022/index.html).

We carried out a performance analysis of the latest Linux AutoNUMA
memory tiering on graph processing applications. We noticed that hot
pages cannot be properly identified by the reactive approach used by
AutoNUMA due to irregular/random memory access patterns. Thus, as a
POC, we implemented and evaluated a simple idea of having an external
user-level process/agent that, based on prior profiling results of
memory regions, could make more effectively memory chunk/object-based
mappings (instead of page-level allocation/migration) in advance on
either DRAM or CXL/PMEM (via mbind calls). This kind of tiering
solution could deliver up to 2x more performance for graph analytics
workloads. We plan to evaluate other workloads as well.

Having a feature like "pidfd/process_mbind" would really simplify our
user-level agent implementation moving forward, as right now we are
adding a LD_PRELOAD wrapper (for signal handler) to listen and execute
"mbind" requests from another process. If there's any other
alternative solution to this already (via ptrace?), please let me
know.

Thank you!

Vinicius Petrucci
Principal Performance Engineer
Micron Technology


  parent reply	other threads:[~2022-10-12 12:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10  9:48 Zhongkun He
2022-10-10 16:22 ` Frank van der Linden
2022-10-11 15:00   ` Michal Hocko
2022-10-11 17:22     ` Frank van der Linden
2022-10-11 19:29       ` Michal Hocko
2022-10-12  3:14         ` Abel Wu
2022-10-12 12:34         ` Vinicius Petrucci [this message]
2022-10-12 13:07           ` Michal Hocko
2022-10-12 13:23             ` Michal Hocko
2022-10-12 16:51           ` Frank van der Linden
2022-10-11 14:57 ` Michal Hocko
2022-10-12  7:55   ` [External] " Zhongkun He
2022-10-12  9:02     ` Michal Hocko
2022-10-12 11:22       ` Zhongkun He
2022-10-12 12:15         ` Michal Hocko
2022-10-13 10:44           ` Zhongkun He
2022-10-13 11:26             ` Michal Hocko
2022-10-13 12:50               ` Zhongkun He
2022-10-13 13:17                 ` Michal Hocko
2022-10-13 13:42                   ` Zhongkun He
2022-10-12  4:16 ` Bagas Sanjaya
2022-10-12  8:18   ` [External] " Zhongkun He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEZ6=UOA6=ikSdxN662xyhT3wauGuqZReKLOb=_9EmSRckNr=Q@mail.gmail.com' \
    --to=vpetrucci@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=fvdl@google.com \
    --cc=hezhongkun.hzk@bytedance.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=wuyun.abel@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox