RE: doubt about 99% of the cases if the first byte of the file is cached.

Liang Yang <[email protected]>
Newsgroups gmane.network.tux
Message-ID <[email protected]>
Hi, Ingo

Yes, we didn't enable noatime.

But even we didn't enable noatime, LED should flash only for
1/10 second or shorter time since Linux just need to update
the access time flag of this file. it is not a big job and it shouldn't
take Linux a long time to update this filed. But we noticed the
Hard Disk LED flash for almost 2 seconds each time. So maybe
Linux is doing some large amount hard disk read/write operation
instead of just updating file access time flag.

I guess for all the sizes of files, the access time flag should be the
same. Is that correct?

Liang


-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf
Of Ingo Molnar
Sent: Tuesday, April 23, 2002 7:12 AM
To: Liang Yang
Cc: [email protected]
Subject: RE: doubt about 99% of the cases if the first byte of the file is
cached.



On Tue, 23 Apr 2002, Liang Yang wrote:

> Yes, Hard disk LED flashes for sometime even the server received the
> request of the same 10MB file for the 3rd, 4th,5th time. [...]

do you have the 'noatime' mount-option enabled? Otherwise the atime field
will be updated on disk.

> I know how to read the first byte of a specific file(set
> req->desc.count=1 before I invoke do_generic_file_read ), but I don't
> know how to read just the last byte of file.

set in_file.f_pos to be inode->i_size-1, and use desc.count=1.

	Ingo



_______________________________________________
tux-list mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/tux-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.