Develop and Download Open Source Software

最近の更新

2012-05-12
2011-05-31
2011-05-11
2011-03-22
2011-02-04
2010-10-30

Wikiガイド

JF Wiki トップページへ

ダウンロード: xip.txt

現在作業中の文書です。お気づきの点がありましたら、jf@listserv.linux.or.jp、チケットフォーラムのいずれかにお寄せください。

=========================================================
これは、
linux-2.6.29/Documentation/filesystems/xip.txt の和訳
です。
翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
更新日 : 2009/03/25
翻訳者 : Seiji Kaneko < skaneko at mbn dot or dot jp >
校正者 : Noguchi Kenji < tokyo246 at gmail dot com >
=========================================================				   #Execute-in-place for
file mappings
#----------------------------------
ファイルマップのための Execute-in-place
-------------------------------------

#Motivation
#----------
動機付け
--------
#File mappings are performed by mapping page cache pages to userspace. In
#addition, read&write type file operations also transfer data from/to the page
#cache.
ファイルマッピングは、ページキャッシュページをユーザ空間にマップすることで
実現されています。加えて、読み書きのようなファイル操作も、ページキャッシュ
との間でデータをやりとりしています。

#For memory backed storage devices that use the block device interface, the page
#cache pages are in fact copies of the original storage. Various approaches
#exist to work around the need for an extra copy. The ramdisk driver for example
#does read the data into the page cache, keeps a reference, and discards the
#original data behind later on.
ブロックデバイスインターフェースを持つ、メモリ技術を用いたストレージデバイ
スの場合、ページキャッシュページは実際には元のストレージのコピーになります。
このような追加コピーを削減するための様々な手法が存在します。例えば ramdisk
ドライバは、ページキャッシュにデータを読み込み、その参照を保持し、裏にある
オリジナルデータをその後に削除します。

#Execute-in-place solves this issue the other way around: instead of keeping
#data in the page cache, the need to have a page cache copy is eliminated
#completely. With execute-in-place, read&write type operations are performed
#directly from/to the memory backed storage device. For file mappings, the
#storage device itself is mapped directly into userspace.
Execute-in-place はこの問題を全く別の方法で解決します。ページキャッシュにデ
ータを保持するのではなく、ページキャッシュにコピーを持つ必要性を完全になく
します。execute-in-place を使った場合、読み書き操作はメモリ技術を使ったスト
レージデバイスとの間で直接やりとりされます。ファイルマッピングについては、
ストレージデバイス自体がユーザ空間に直接マップされます。

#This implementation was initially written for shared memory segments between
#different virtual machines on s390 hardware to allow multiple machines to
#share the same binaries and libraries.
この実装は、もともとは S390 ハードウェア上で、別々の仮想マシン間でメモリセ
グメントを共有して、複数のマシンが同じバイナリとライブラリを共有できるよう
にするために書かれたものでした。

#Implementation
#--------------
実装
----
#Execute-in-place is implemented in three steps: block device operation,
#address space operation, and file operations.
Execute-in-place は三つのステップで実装されています。ブロックデバイス操作
と、アドレス空間操作と、ファイル操作です。

#A block device operation named direct_access is used to retrieve a
#reference (pointer) to a block on-disk. The reference is supposed to be
#cpu-addressable, physical address and remain valid until the release operation
#is performed. A struct block_device reference is used to address the device,
#and a sector_t argument is used to identify the individual block. As an
#alternative, memory technology devices can be used for this.
direct_access と言う名称のブロックデバイス操作が、ディスク上のブロックに
対する参照 (ポインタ) を解決するために用いられます。この参照は CPU からア
ドレス可能な物理アドレスで、リリース操作実行まではずっと有効であることを
想定しています。block_device 構造体への参照がデバイスを指定する際に用いら
れ、sector_t 引数が個々のブロックを識別するために用いられます。代替手段と
して、メモリ技術を用いたデバイスをこのように用いることができます。

#The block device operation is optional, these block devices support it as of
#today:
ブロックデバイス操作はオプションであり、現時点でブロックデバイス操作がサ
ポートされているのは以下のものです。
#- dcssblk: s390 dcss block device driver
- dcssblk: s390 dcss ブロックデバイスドライバ

#An address space operation named get_xip_mem is used to retrieve references
#to a page frame number and a kernel address. To obtain these values a reference
#to an address_space is provided. This function assigns values to the kmem and
#pfn parameters. The third argument indicates whether the function should allocate
#blocks if needed.
アドレス空間操作 get_xip_mem が、ページフレーム番号とカーネルアドレスへの参
照を解決するために用いられます。これらの値を取得するために、アドレス空間に
対する参照が提供されます。この関数が、kmem と pfn パラメータに対する値を設
定します。三番目の引数は、関数が必要に応じてブロックの割付を行なうべきかど
うかを示すものです。

#This address space operation is mutually exclusive with readpage&writepage that
#do page cache read/write operations.
#The following filesystems support it as of today:
#- ext2: the second extended filesystem, see Documentation/filesystems/ext2.txt
このアドレス空間操作は、ページキャッシュ読み書き動作を行なう readpage および
writepage 操作と相互に排他です。現時点で以下のファイルシステムがこの機能をサ
ポートしています。

- ext2: 二番目の拡張ファイルシステム。Documentation/filesystems/ext2.txt 参照

#A set of file operations that do utilize get_xip_page can be found in
#mm/filemap_xip.c . The following file operation implementations are provided:
#- aio_read/aio_write
#- readv/writev
#- sendfile
get_xip_page を用いるファイル操作群が、mm/filemap_xip.c に記載されています。
以下のファイル操作実装が提供されています。
- aio_read/aio_write
- readv/writev
- sendfile

#The generic file operations do_sync_read/do_sync_write can be used to implement
#classic synchronous IO calls.
汎用ファイル操作 do_sync_read/do_sync_write を、従来の同期 IO コールを実装
するために使うことができます。

#Shortcomings
#------------
欠点
----
#This implementation is limited to storage devices that are cpu addressable at
#all times (no highmem or such). It works well on rom/ram, but enhancements are
#needed to make it work with flash in read+write mode.
#Putting the Linux kernel and/or its modules on a xip filesystem does not mean
#they are not copied.
この実装は、ストレージデバイスが常に CPU からアドレス付け可能 (highmem など
を用いない) であるという制約を持ちます。rom/ram との組み合わせでは上手く動
きますが、flash を read+write モードで動作させるためには拡張が必要です。
Linux カーネルや、モジュールを xip ファイルシステム上に置くことは、それら
がコピーされないと言うことを意味するわけではありません。

お名前 ( )
コメント

コメントが長くなった場合は、JF@linux.or.jp にお寄せください。

JF Wiki トップページへ戻る


SourceForge.JP is a Japanese version of SourceForge.net. For developments that are not related to Japan, we recommend you to use SourceForge.net.