[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Short question about the mmap method


Steffen Persvold <sp _at_ scali.no> wrote:

> I have a question regarding drivers implementing the
> mmap and nopage methods. In some references
> I've read that pages in kernel allocated memory (either 
> allocated with kmalloc, vmalloc or __get_free_pages) 
> should be set to reserved (mem_map_reserve or 
> set_bit(PG_reserved, page->flags) before they can be 
> mmap'ed to guarantee that they can't be swapped out. 
> Is this true ?

Steffen,
I recently implemented the mmap() call in the SCSI generic
(sg) driver. See that driver in lk 2.4.17 or go to
   http://www.torque.net/sg 
and download version 3.1.22 of the sg driver from the table.
It will run on any kernel in the 2.4 series. It should
answer most of your questions (at least about mmap-ing
memory obtained from __get_free_pages() which is a bit 
tricky).  

Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」