public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj@suse.de>
To: davidm@hpl.hp.com
Cc: Ulrich Drepper <drepper@redhat.com>, libc-hacker@sources.redhat.com
Subject: Re: [patch] add alloc_pages/free_pages support
Date: Fri, 04 Oct 2002 20:02:00 -0000	[thread overview]
Message-ID: <u8adlud6gi.fsf@gromit.moeb> (raw)
In-Reply-To: <15773.11197.780790.750761@napali.hpl.hp.com> (David Mosberger's message of "Thu, 3 Oct 2002 22:48:45 -0700")

David Mosberger <davidm@napali.hpl.hp.com> writes:

>>>>>> On Thu, 03 Oct 2002 15:30:56 -0700, Ulrich Drepper <drepper@redhat.com> said:
>
>   Uli> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>
>
>   >> Uli, do you have any other feedback or are you OK with it?
>
>   Uli> The header still isn't right.  You cannot have the hidden
>   Uli> macros in there.  And the function prototypes are missing
>   Uli> __THROW.
>
> OK, how is this?
> [...]
> 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	4 Oct 2002 05:45:31 -0000
> @@ -102,6 +102,10 @@
>      # r*
>      readahead;
>  
> +    gethugepagesize;
> +    alloc_hugepages;
> +    free_hugepages;
> +

With glibc 2.3 out of the door, this has to be added with version
glibc 2.3.1.
> 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	4 Oct 2002 05:45:36 -0000
> @@ -0,0 +1,78 @@
> +/* Copyright (C) 2002 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   The GNU C Library is free software; you can redistribute it and/or
> +   modify it under the terms of the GNU Lesser General Public
> +   License as published by the Free Software Foundation; either
> +   version 2.1 of the License, or (at your option) any later version.
> +
> +   The GNU C Library is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +   Lesser General Public License for more details.
> +
> +   You should have received a copy of the GNU Lesser General Public
> +   License along with the GNU C Library; if not, write to the Free
> +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> +   02111-1307 USA.  */
> +
> +#ifndef _SYS_HUGEPAGE_H
> +#define _SYS_HUGEPAGE_H 1
> +
> +/* This header file defines the huge page interface.  A huge page is a
> +   non-swappable (pinned) page of virtual memory.  As the name
> +   suggests, the size of a huge page is typically orders of magnitudes
> +   bigger than the value returned by getpagesize().  For example,
> +   depending on kernel configuration, on x86 it may be 2MBytes or
> +   4MBytes and on ia64 it is typically one of 16MB, 256MBytes, or
> +   4GBytes.  Note that because huge pages are never swapped, they are
> +   a relatively rare commodity and applications are expected to fall
> +   back to allocating regular pages if a huge page cannot be
> +   allocated.  */
> +
> +#include <features.h>
> +
> +#define __need_size_t
> +#include <stddef.h>
> +
> +__BEGIN_DECLS
> +
> +/* Return the size of a huge page.  */
> +
> +extern size_t __gethugepagesize (void) __attribute__ ((__const__)) __THROW;

The header installed in the user level include should not have the
__gethugepagesize.  If you need the prototype, we add it to an
internal header.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

  reply	other threads:[~2002-10-04  7:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-03  0:03 David Mosberger
2002-10-03  0:20 ` Ulrich Drepper
2002-10-03 12:37   ` David Mosberger
2002-10-03 14:44     ` David Mosberger
2002-10-03 15:05   ` David Mosberger
     [not found]     ` <200210032146.g93LkB119076@magilla.sf.frob.com>
2002-10-03 15:30       ` David Mosberger
2002-10-03 15:34         ` Ulrich Drepper
2002-10-03 22:48           ` David Mosberger
2002-10-04  0:14           ` David Mosberger
2002-10-04 20:02             ` Andreas Jaeger [this message]
2002-10-22 19:39               ` David Mosberger
2002-10-22 23:52                 ` Ulrich Drepper
2002-10-22 23:58                   ` David Mosberger
2002-10-23  8:20                     ` Ulrich Drepper
2002-10-23 10:34                       ` David Mosberger
2002-10-23 11:46                         ` Ulrich Drepper
2002-10-23 14:51                           ` David Mosberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u8adlud6gi.fsf@gromit.moeb \
    --to=aj@suse.de \
    --cc=davidm@hpl.hp.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).