From patchwork Tue May 31 20:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 54593 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB6E2396E82F for ; Tue, 31 May 2022 20:10:02 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id F0CF2383E68C for ; Tue, 31 May 2022 20:09:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F0CF2383E68C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.91,266,1647331200"; d="scan'208";a="79287018" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 31 May 2022 12:09:48 -0800 IronPort-SDR: Y3YvbFxIOqomgbcYMH0BB6TPkKSBIvHl8QSCd+n/qLOWPl2m7PO83vebHFNFITTadTKFAyTqRe c2xS8H27IktpgyymnIsM+QY5vRAgk7lpY+5HT+IHryoJSsRO0+biu22qlQ31xpOu9/dgVHqiOP OvAD0eDpZHvRG7le9eqY4tdYbl1rWLNuhPyx+VoqSrDEe+uOUaKUX9jwvK3KGajEs7ip/BFuK9 0CNDODA/6T+RDyW7WpUlpAvAxujiCHzIEUY3df14Msn3NYezLGEmSxHzkDJeJxHgCVfNic8fb1 YDk= Date: Tue, 31 May 2022 20:09:44 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Subject: Add MADV_DONTNEED_LOCKED from Linux 5.18 to bits/mman-linux.h Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3119.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Linux 5.18 adds a constant MADV_DONTNEED_LOCKED (defined in multiple header files, but with the same value on all architectures). Add this constant to bits/mman-linux.h. Tested for x86_64. diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index 85bc4d3c3c..cb5ad30ef9 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -93,6 +93,8 @@ readable. */ # define MADV_POPULATE_WRITE 23 /* Populate (prefault) page tables writable. */ +# define MADV_DONTNEED_LOCKED 24 /* Like MADV_DONTNEED, but drop + locked pages too. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif