kiobuf mapping with "mem=" boot option

From: fc scsi
Date: Tue Jun 22 2004 - 04:49:36 EST


Hi,

We have an application which uses a separate pool of
memory not managed by linux (reserved using "mem="
option at boot command line) and a memory manager
which manages this pool of memory in user space. The
algorithm works like this:

a. use "mem=xM" option to boot command line
b. mmap() the memory above "xM" till end of actual RAM
in user space application.
c. the mmaped region is managed by a user space memory
manager.

This works fine for the application.

1. Now we want to access a chunk of memory which we
allocated using the user level memory manager in
kernel space also. For this we tried kiobuf approach
on the memory which was allocated in user space. But
this approach doesn't seem to work on this mmaped
memory (map_user_kiobuf() gives EFAULT: Bad Address).
Is this valid behaviour?

2. Also, will we be wrong in making the assumption
that the pages for memory above x Megs will never be
swapped out?

If the answer to question 1 above is, that memory
which is beyond x Megs (mem=xM) can not be used for
kiobuf mapping, then is it ok if we directly access
the user space address from kernel space (assuming the
answer to question 2 is yes).

Any information in this regard will be of great help.

Thanks in advance.




__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/