Speaker

Sudarshan Rajagopalan

Sudarshan Rajagopalan

Staff Engineer, Qualcomm Innovation Center, Inc.

Actions

Working as Linux Kernel Developer in Qualcomm for the past 7 years. Interests are in Embedded Systems and Firmware, System designs and Computer Architecture.

Memory page-pooling with auto refill feature for improved memory allocation latency

Memory pooling is great for improving allocation latency. But its possible that these pools could be exhausted quickly and be empty for long periods of time thereby impacting alloc latency.

Here we describe a memory pooling scheme where the Linux kernel will automatically refill these pools safely upon exhaustion when system memory stats are good. This refilling is done asynchronously via kthreads and they are woken up when memory in the pools falls low and fills them uptil a set threshold. This increases the probability of the pools being filled in advance before a memory intensive application can run which increases its memory performance where memory is allocated instantly from the pools rather than searching from the system buddy allocator. The memory in the pools can also be quickly reclaimed through shrinkers when system is under memory pressure, thereby increasing the utilization of the pools.

This overall reduces the alloc latencies by multiple folds whose performance gain can be achieved here merely by software alone. Multimedia uses (Camera, Video, Graphics etc) which are usually memory intensive can greatly leverage such pooling scheme for improved performance.

Deferred memblocks init for boot time reduction

During boot the Linux kernel initializes the entire RAM by creating the struct pages and adding the pages to the buddy allocator. This is done in single threaded fashion on the boot CPU alone.

On systems with larger RAM (8, 12GB), this process would take considerable amount of time leading to higher boot time KPI. To reduce the boot time, we can bring up the system with just a subset of memory (say 1GB) at boot which is sufficient to bootup the kernel and the userspace. After kernel/userspace init the SMP would be up, we then initialize the remaining blocks of RAM in an asynchronous parallel fashion using the memory hotplug framework in the Linux kernel utilizing the parallelism of the SMP system.

This can be done using kthreads within the kernel or by a userspace service. This approach helps to reduce the overall kernel boot time on systems with larger RAM.

Sudarshan Rajagopalan

Staff Engineer, Qualcomm Innovation Center, Inc.

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top