Re: "Need information on block layer buffer cache behavior"

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

 



Hi Murali...

It's just a comment from vfs moron, so be careful :)

On Thu, Jul 22, 2010 at 21:56, Murali N <nalajala.murali@xxxxxxxxx> wrote:
> Hi,
>
> I have a storage media, where I need to write the data to. Right now,
> I am using the vfs_write calls to write the data on the media. I am
> not explicitly syncing the data on to the device in my driver file.

Thus it will be done asynchronously, IMO. Unless you mount it as
accessed in direct I/O mode...

I
> am expecting the VFS to take care of syncing this data on to the
> storage media.

I think so too..

>In this scenario, If I try to copy big files(~GB's of
> data), What is the expected behavior from the VFS. Does kernel
> allocate large cache buffers (or) does it use fixed cache buffers and
> manipulate on these fixed buffers (or) does it go on increasing the
> buffer caches based on the amount of data to be written on the storage
> media.?

Depends on your free physical RAM i guess. But all in all, IMHO buffer
cache will be allocated as much as your file size. However, since you
said it's Gigs..... probably tens Gigs or more.... quite likely it
couldn't fit your RAM. Thus after some are allocated, then discarded
or reassigned to handle writing on different sector.

Be warned that page cache allocated are quite likely done while
another memory allocation happen. Thus, this is where the "dynamic"
aspect kicks in.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux