Skip to contentSkip to conversation

File System Address Space Operations

DISCUSSION UZAIR LAKHANI 3 participants 5 messages Jul 29, 2006 – Aug 1, 2006 VFS

lore
Share & tools
lore
#0 lore raw

Hello All,

I want to find out the details of the address space operations. Where can I get the detailed information about the address space operations. In addition I want to find out whether these address space operations are for performance reasons or are mandatory to implement. For example consider the case that we can avoid implementing file operations' readv and writev functions because these are for performance reasons and instead could implement only simple read and write functions of file operations.

In addition do distributed file systems on the client and server side require to implement address space operations e.g. nfs (client side) implements these address space operations.

Thanks,
Uzair Lakhani,
Karachi, Pakistan.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 5 lines · UZAIR LAKHANI

Hello All,

I want to find out the details of the address space operations. Where can I get the detailed information about the address space operations.

Have a look at

a) Documentation/filesystems/vfs.txt
b) Documentation/filesystems/Locking and
c) some simple fs that uses it (minix?)

Quoted 3 lines

In addition I want to find out whether these address space
operations are for performance reasons or are mandatory to
implement.

No, I guess you could access the underlying device (or a remote server) each time a filesystem object is read or written to. This approach would be simple but

a) it could be very slow (at least a block device based filesystem like that would),
b) you basically wouldn't be able to implement mmap unless you wrote an equivalent of the page cache and
c) when you use the generic functions to handle the file operations and only code the address space operations, it is not that much more difficult.

Quoted 4 lines

In addition do distributed file systems on the client and server side require to implement address space operations e.g. nfs (client side) implements these address space operations.

I'm not an expert on network filesystems but it would probably depend on whether and what kind of client caching you want.

HTH

Martin

#2 lore raw
Quoted 7 lines · --- Martin Jambor
Quoted 3 lines · UZAIR LAKHANI

Hello All,

I want to find out the details of the address

space

Quoted 1 line

operations. Where can I get the detailed

Quoted 8 lines

information

Quoted 1 line

about the address space operations.

Have a look at

a) Documentation/filesystems/vfs.txt
b) Documentation/filesystems/Locking and
c) some simple fs that uses it (minix?)

Hello All,

Thanks for your reply and help. But the (a) and (b) above don't give me enough details about the theoretical aspects of address space operations. For example why these operations are needed. What is their flow etc. If you please give some more links that help me understanding address space operations and buffer cache issues clearly, then I will be thankful to you.

Thanks,
Uzair Lakhani

Quoted 37 lines
Quoted 2 lines

In addition I want to find out whether

these address space

Quoted 1 line

operations are for performance reasons or

are mandatory to

Quoted 1 line

implement.

No, I guess you could access the underlying device (or a remote
server) each time a filesystem object is read or written to. This
approach would be simple but

a) it could be very slow (at least a block device based filesystem
like that would),
b) you basically wouldn't be able to implement mmap unless you wrote
an equivalent of the page cache and
c) when you use the generic functions to handle the file operations
and only code the address space operations, it
is not that much
more difficult.

Quoted 1 line

In addition do distributed file systems on the

client

Quoted 3 lines

and server side require to implement address space operations e.g. nfs (client side) implements these address space operations.

I'm not an expert on network filesystems but it would probably depend
on whether and what kind of client caching you want.

HTH

Quoted 8 lines

Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#3 lore raw
Quoted 5 lines

But the (a) and (b)
above don't give me enough details about the theoretical aspects of address space operations. For example why these operations are needed. What is their flow etc.

It would help to know which part you're stuck on:

The address space operations are the methods of an address space object. An object obviously needs methods. Or maybe you're asking about the particular operations?

Are you asking how an address space works, or how and why a filesystem driver uses address spaces? Address spaces exist independently of filesystems -- they can be used for things other than files and filesystems don't have to use them.

The distinction is important, because how an address space works is primarily a memory manager question, while how filesystems use them is primarily a filesystem question.

BTW, the term "address space" can be quite misleading. In computers, "address space" usually refers to something else -- something to do with the CPU architecture. What the linux kernel calls an address space is what some other operating systems call a "virtual memory object," and I find that a lot more descriptive.

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems

#4 lore raw
In reply to UZAIR LAKHANI
Quoted 19 lines · UZAIR LAKHANI
Quoted 7 lines · Martin Jambor
Quoted 3 lines · UZAIR LAKHANI

Hello All,

I want to find out the details of the address

space

Quoted 1 line

operations. Where can I get the detailed

Quoted 8 lines

information

Quoted 1 line

about the address space operations.

Have a look at

a) Documentation/filesystems/vfs.txt
b) Documentation/filesystems/Locking and
c) some simple fs that uses it (minix?)

Hello All,

Quoted 7 lines

Thanks for your reply and help. But the (a) and (b) above don't give me enough details about the theoretical aspects of address space operations. For example why these operations are needed. What is their flow etc. If you please give some more links that help me understanding address space operations and buffer cache issues clearly, then I will be thankful to you.

I think both (a) and (b) are rather good. More stuff I can think about would include:

* Robert Love: Linux Kernel Development, Chapter 15 (page 269)

* Mel Gorman: Understanding the Linux Virtual Memory Manager, section 4.4 (available online)

* I guess "Understanding the Linux Kernel" would cover it as well but I have not had a look at it yet.

* Search Google for "Linux Page Cache." (I, for example, within a few seconds came across http://www.faqs.org/docs/kernel_2_4/lki-4.html
which does not seem very outdated (at a glance).

I personally learnt about the page cacher by reading the source code of ramfs and minix, especially the generic kernel handlers of file_operations and address_space_operations. If you want to really understand the stuff, you simply have to do it. If you have problems
understanding the code, people at #kernelnewbies
(www.kernelnewbies.org) can and often do help.

HTH

Martin