From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: nigelenki@comcast.net, linux-kernel@vger.kernel.org
Subject: Re: Packing data in kernel memory
Date: Tue, 13 Jun 2006 13:32:27 -0700 [thread overview]
Message-ID: <20060613133227.1eee4578.rdunlap@xenotime.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0606132217110.11918@yvahk01.tjqt.qr>
On Tue, 13 Jun 2006 22:18:55 +0200 (MEST) Jan Engelhardt wrote:
>
> >Subject: Packing data in kernel memory
> >
>
> Can't you just use mlock(), if you want to keep it in RAM?
>
> Or do you need it in kernel memory, because you need it in the lowmem area?
> Or for interaction with other kernel code?
>
> >Is there a way to pack and store arbitrary data in the kernel, or do I
> >need to roll my own?
Sounds a bit like a slab cache to me.
> Write a device driver, kmalloc some buffer, and copy data via a write
> function from userspace to that buffer. Should be trivial.
>
> >1 excess pages, 4 units wasted memory.
>
> Of course, kmalloc only works up to some boundary AFIACS.
128 KB on some arches. More on a few IIRC.
---
~Randy
next prev parent reply other threads:[~2006-06-13 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-13 18:48 John Richard Moser
2006-06-13 20:18 ` Jan Engelhardt
2006-06-13 20:32 ` Randy.Dunlap [this message]
2006-06-13 20:54 ` John Richard Moser
2006-06-13 21:16 ` Randy.Dunlap
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=20060613133227.1eee4578.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nigelenki@comcast.net \
/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®