From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1105) id C97F53858D1E; Thu, 22 Dec 2022 15:13:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C97F53858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671721998; bh=ohFyKgp0LhIPVqZRo1Jw7bHPx2ObfzIxYYDZAQUngvI=; h=From:To:Subject:Date:From; b=RtsudAslJz+8t9CBQtqZFwJNcJU5vMkvmaAiKGf7ZsiAg4K2ThaIv9gjAHI+0zMNj YarZBKmAr6vh6yQkGA72yC9DUSoFGTIKdvDXN/n7bPhwQhs9in58pbbO4YzD6PiDXJ BHEdcj7xkzzZGRNnwAz353IFp8wfFDs3Tug5+NSU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joseph Myers To: glibc-cvs@sourceware.org Subject: [glibc] Define MADV_COLLAPSE from Linux 6.1 X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/master X-Git-Oldrev: e2b68828fab4fdfa5595fa89180230cdc4373ec1 X-Git-Newrev: 81a94a2ae34bac9c3d907bbe0468ba56914accb0 Message-Id: <20221222151318.C97F53858D1E@sourceware.org> Date: Thu, 22 Dec 2022 15:13:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=81a94a2ae34bac9c3d907bbe0468ba56914accb0 commit 81a94a2ae34bac9c3d907bbe0468ba56914accb0 Author: Joseph Myers Date: Thu Dec 22 15:12:52 2022 +0000 Define MADV_COLLAPSE from Linux 6.1 Add the MADV_COLLAPSE constant from Linux 6.1 to bits/mman-linux.h and the hppa bits/mman.h. Tested for x86_64. Diff: --- sysdeps/unix/sysv/linux/bits/mman-linux.h | 1 + sysdeps/unix/sysv/linux/hppa/bits/mman.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index 1fb7f888aa..c3818ce356 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -91,6 +91,7 @@ writable. */ # define MADV_DONTNEED_LOCKED 24 /* Like MADV_DONTNEED, but drop locked pages too. */ +# define MADV_COLLAPSE 25 /* Synchronous hugepage collapse. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index acaa1cc3e7..1d895a5234 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -79,4 +79,6 @@ # define MADV_WIPEONFORK 71 /* Zero memory on fork, child only. */ # undef MADV_KEEPONFORK # define MADV_KEEPONFORK 72 /* Undo MADV_WIPEONFORK. */ +# undef MADV_COLLAPSE +# define MADV_COLLAPSE 73 /* Synchronous hugepage collapse. */ #endif