On Fri, May 14, 2021 at 07:16:23PM +0200, Uladzislau Rezki wrote: > > > See below an example of audio glitches. That was related to our phones > > > and audio workloads: > > > > > > # Explanation is here > > > wget ftp://vps418301.ovh.net/incoming/analysis_audio_glitches.txt > > > > > > # Audio 10 seconds sample is here. > > > # The drop occurs at 00:09.295 you can hear it > > > wget ftp://vps418301.ovh.net/incoming/tst_440_HZ_tmp_1.wav > > > > > > Apart of that a slow allocation can course two type of issues. First one > > > is direct. When for example a high-priority RT thread does some allocation > > > to bypass data to DSP. Long latency courses a delay of data to be passed to > > > DSP. This is drivers area. > > > > > > Another example is when a task is doing an allocation and the RT task is > > > placed onto a same CPU. In that case a long preemption-off(milliseconds) > > > section can lead the RT task for starvation. For mobile devices it is UI > > > stack where RT tasks are used. As a result we face frame drops. > > > > > > All such issues have been solved after a rework: > > > > > > wget ftp://vps418301.ovh.net/incoming/Reworking_of_KVA_allocator_in_Linux_kernel.pdf > > > > > > > Thanks. That was enough for me to search to see what sort of general > > workload would be affected. Mostly it's driver specific. A lot of the users > > that would be potentially hot are already using kvmalloc so probably not > > worth the effort so test_vmalloc.sh makes sense. > > > You are welcome. > > As for a helper. Does it sound good for you? BTW, once upon a time i had > asked for it :) > The intent was that instead of guessing in advance what APIs would be needed that users would add an API helper where appropriate. > From b4b0de2990defd43453ddcd2839521d117cb3bd9 Mon Sep 17 00:00:00 2001 > From: "Uladzislau Rezki (Sony)" <urezki@xxxxxxxxx> > Date: Fri, 14 May 2021 18:39:08 +0200 > Subject: [PATCH] mm/page_alloc: Add an alloc_pages_bulk_array_node() helper > > Add a "node" variant of the alloc_pages_bulk_array() function. > The helper guarantees that a __alloc_pages_bulk() is invoked > with a valid NUMA node id. > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx> Acked-by: Mel Gorman <mgorman@xxxxxxx> Include it as part of your series adding the vmalloc user. -- Mel Gorman SUSE Labs