Skip to content

tcmalloc making syscall madvise(MADV_DONTNEED) from a NOHZ_FULL cpu is causing the kernel to kick the CPU by raising a local timer interrupt #247

@lano1106

Description

@lano1106

Avoiding syscalls at all from NOHZ_FULL thread is a suggestion coming from Paul E. McKenney:
https://lore.kernel.org/rcu/367dc07b740637f2ce0298c8f19f8aec0bdec123.camel@trillion01.com/T/#me413247989436bf4f42acdbec96538767c69e2a4

if you call the kernel, it is very hard to stop it from doing something that will raise interrupts:
https://bugzilla.kernel.org/show_bug.cgi?id=219119

the only syscall my thread does is from tcmalloc.

I have not looked up all the feature and configurations that tcmalloc offer yet. If it is possible out-of-the box such as setting up an housekeeping thread and specify its CPU affinity, that would be a good way... Or maybe some tcmalloc config settings can be used to minimize calls to madvise().

In any case, this issue is to document the solution...

not allocating memory is not an option since it is made by openssl. Networking I/O is made on another processor and the SSL streams delivered by a custom openssl BIO object.

I am not sure exactly which tcmalloc version that I am using. It is the one bundled with gperftools 2.15 ArchLinux package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions