mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abraham vd Merwe <abraham@2d3d.co.za>
To: Pannaga Bhushan <bhushan@multitech.co.in>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: A hole in kernel space!
Date: Wed, 6 Nov 2002 14:02:22 +0200	[thread overview]
Message-ID: <20021106140222.A17370@crystal.2d3d.co.za> (raw)
In-Reply-To: <3DC903BE.F4CD5A52@multitech.co.in>; from bhushan@multitech.co.in on Wed, Nov 06, 2002 at 17:27:50 +0530

[-- Attachment #1: Type: text/plain, Size: 2584 bytes --]

Hi Pannaga!

Use the mem= parameter on the kernel command-line to specify less memory
than what is available. Then you can use the last unused chunk of memory,
e.g. if you have 256M memory and you want to "steal" a 40M chunk at the end:

mem=216M

> Hi all,
>         I am looking for a setup where I need to have a certain amount
> of data always available to the kernel. The size of data I am looking at
> is abt
> 40MB(preferably, but I will settle for 20MB too) . So the normal kmalloc
> will not help me. So what I did was, I created a hole in kernel space by
> putting
> the following line in vmlinux.lds
> 
>     ALIGN(4096);
>  __hole_start = .;
>     . = . + 0xmy_size;
>  __hole_end = .;
> 
> First, I put these lines in code segment and found that  'my_size'
> cannot go beyond 0x500000(5MB) . Any larger value , the kernel image
> refuses to
> boot up. I found the same problem with these lines being in data segment
> or in the bss segment.
> 
> But putting these line after
> 
> _end = .;
> 
> line in vmlinux.lds, I am able to give 0x1700000(17MB) to my_size and
> still boot with that kernel image.
> 
> My questions are :
> 
> 1.   Is there any other way I can get to keep 40MB(or even 20MB) of
> contiguous kernel memory space ?
> 
> 2.    Abt the 17MB hole, I am able to use after the   _end = .;
> ....     is this 17MB really there in kernel image?('cos it isn't in any
> segment and also it
> appears after _end).
>         if yes, are the pages corresponding to this region swappable or
> is it that since this hole appears in kernel image, it is locked to a
> physical space
> and this is never swapped. (basically, i want by data in kernel space
> always available to kernel without having to bother abt swapping the
> pages back)
> 
> Thanx in advance,
> Pannaga Bhushan
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 

Regards
 Abraham

UNIX enhancements aren't.

__________________________________________________________
 Abraham vd Merwe - 2d3D, Inc.

 Device Driver Development, Outsourcing, Embedded Systems

  Cell: +27 82 565 4451         Snailmail:
   Tel: +27 21 761 7549            Block C, Aintree Park
   Fax: +27 21 761 7648            Doncaster Road
 Email: abraham@2d3d.co.za         Kenilworth, 7700
  Http: http://www.2d3d.com        South Africa


[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2002-11-06 11:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 11:57 Pannaga Bhushan
2002-11-06 12:02 ` Abraham vd Merwe [this message]
2002-11-06 12:19 ` Matti Aarnio
2002-11-06 13:49 ` Marc A. Volovic
2002-11-06 14:07   ` Richard B. Johnson
2002-11-06 16:09     ` Marc A. Volovic
2002-11-06 21:07       ` Adrian Bunk

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=20021106140222.A17370@crystal.2d3d.co.za \
    --to=abraham@2d3d.co.za \
    --cc=bhushan@multitech.co.in \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®