From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4345 invoked by alias); 3 Oct 2002 07:03:24 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 4329 invoked from network); 3 Oct 2002 07:03:23 -0000 Received: from unknown (HELO deimos.hpl.hp.com) (192.6.19.190) by sources.redhat.com with SMTP; 3 Oct 2002 07:03:23 -0000 Received: from hplms2.hpl.hp.com (hplms2.hpl.hp.com [15.0.152.33]) by deimos.hpl.hp.com (8.9.3 (PHNE_24419)/HPL-PA Relay) with ESMTP id AAA02385 for ; Thu, 3 Oct 2002 00:03:22 -0700 (PDT) Received: from napali.hpl.hp.com (napali.hpl.hp.com [15.4.89.123]) by hplms2.hpl.hp.com (8.10.2/8.10.2 HPL-PA Hub) with ESMTP id g9373MB03287 for ; Thu, 3 Oct 2002 00:03:22 -0700 (PDT) Received: from napali.hpl.hp.com (napali [127.0.0.1]) by napali.hpl.hp.com (8.12.3/8.12.3/Debian -4) with ESMTP id g9373MHW020488; Thu, 3 Oct 2002 00:03:22 -0700 Received: (from davidm@localhost) by napali.hpl.hp.com (8.12.3/8.12.3/Debian -4) id g9373MV6020484; Thu, 3 Oct 2002 00:03:22 -0700 Date: Thu, 03 Oct 2002 00:03:00 -0000 From: David Mosberger Message-Id: <200210030703.g9373MV6020484@napali.hpl.hp.com> To: libc-hacker@sources.redhat.com cc: davidm@napali.hpl.hp.com Subject: [patch] add alloc_pages/free_pages support Reply-to: davidm@hpl.hp.com X-SW-Source: 2002-10/txt/msg00014.txt.bz2 Below is a patch to add support for the new alloc_hugepages()/free_hugepages() system call. I hope I got all the details right. If not, ring... Thanks, --david 2002-10-02 David Mosberger * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Mention sys/hugepage.h. * sysdeps/unix/sysv/linux/syscalls.list: Make alloc_hugepages and free_hugepages weak symbols. * sysdeps/unix/sysv/linux/Versions: Mention alloc_hugepages and free_hugepages. 2002-10-01 Rohit Seth , David Mosberger * sysdeps/unix/sysv/linux/syscalls.list: Add alloc_hugepages and free_hugepages. * sysdeps/unix/sysv/linux/sys/hugepage.h: New file. Index: sysdeps/unix/sysv/linux/Makefile =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/Makefile,v retrieving revision 1.121 diff -u -r1.121 Makefile --- sysdeps/unix/sysv/linux/sysdeps/unix/sysv/linux/Makefile 15 Sep 2002 02:30:28 -0000 1.121 +++ sysdeps/unix/sysv/linux/sysdeps/unix/sysv/linux/Makefile 3 Oct 2002 07:01:33 -0000 @@ -20,7 +20,7 @@ sys/kd.h sys/soundcard.h sys/vt.h \ sys/quota.h sys/fsuid.h \ scsi/sg.h scsi/scsi.h scsi/scsi_ioctl.h sys/pci.h \ - sys/ultrasound.h sys/raw.h sys/personality.h + sys/ultrasound.h sys/raw.h sys/personality.h sys/hugepage.h install-others += $(inst_includedir)/bits/syscall.h Index: sysdeps/unix/sysv/linux/Versions =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/Versions,v retrieving revision 1.18 diff -u -r1.18 Versions --- sysdeps/unix/sysv/linux/sysdeps/unix/sysv/linux/Versions 30 Aug 2002 01:30:55 -0000 1.18 +++ sysdeps/unix/sysv/linux/sysdeps/unix/sysv/linux/Versions 3 Oct 2002 07:01:33 -0000 @@ -102,6 +102,9 @@ # r* readahead; + alloc_hugepages; + free_hugepages; + #errlist-compat 126 _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; } Index: sysdeps/unix/sysv/linux/syscalls.list =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/syscalls.list,v retrieving revision 1.94 diff -u -r1.94 syscalls.list --- sysdeps/unix/sysv/linux/sysdeps/unix/sysv/linux/syscalls.list 15 Aug 2002 08:25:16 -0000 1.94 +++ sysdeps/unix/sysv/linux/sysdeps/unix/sysv/linux/syscalls.list 3 Oct 2002 07:01:33 -0000 @@ -80,3 +80,5 @@ lremovexattr EXTRA lremovexattr i:ss lremovexattr fremovexattr EXTRA fremovexattr i:is fremovexattr +alloc_hugepages EXTRA alloc_hugepages b:ianii __alloc_hugepages alloc_hugepages +free_hugepages EXTRA free_hugepages i:a __free_hugepages free_hugepages Index: sysdeps/unix/sysv/linux/sys/hugepage.h =================================================================== RCS file: sysdeps/unix/sysv/linux/sys/hugepage.h diff -N sysdeps/unix/sysv/linux/sys/hugepage.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ sysdeps/unix/sysv/linux/sys/sysdeps/unix/sysv/linux/sys/hugepage.h 3 Oct 2002 07:01:33 -0000 @@ -0,0 +1,8 @@ +#ifndef _SYS_HUGEPAGE_H +#define _SYS_HUGEPAGE_H 1 + +extern void *alloc_hugepages (int key, void *addr, size_t len, int prot, + int flag); +extern int free_hugepages (void *addr); + +#endif