LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-18-2011, 09:01 AM   #1
ravanan
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
Mount operation is happening very slow in linux 2.6


Hi folks,

I’m having a doubt in the mounting of floppy in my application.



mount(“/dev/sdc”(source dir), ”/fdHD/0/”(Our dest dir) "vfat", l_uReadWrite | MS_SYNCHRONOUS, NULL);





This is the system call which we are using to mount to mount he floppy to our desired folder. When I use this system call it is taking much time in linux 2.6. But we are using the same code in Linux 2.4, at that time the mount operation is happening very fast.

So what I did I replaced the mount system call by system(“mount –t vfat /dev/sdc /fdHD/0/”) . Now when we transfer, the operation is happening very fast. So what is did I removed the MS_SYNCHRONOUS flag from the mount system call. So now it is working fine in 2.6 kernel.



Now my doubt is what the use of MS_SYNCHRONOUS flag is? Why removing the flag making the transfer operation very fast? whatis the effect of this flag in mounting?





What might be the reason for this? Please help me friends?
 
Old 05-18-2011, 12:12 PM   #2
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
What MS_SYNCHRONOUS will do is make sure every write operation is individually carried out one at a time, and not return to whatever requested the write until after it is completed. This will include the writing steps the kernel does to carry out the mount operation itself (such as writing the last known mount date to every superblock on the file system).

Without MS_SYNCHRONOUS, write requests, along with the written data, will be queued up in kernel buffer space. This can allow smarter ordering of data blocks for more speed, as well as writing data blocks quickly enough that adjacent sectors might be written in one pass.

You might want to try your timing tests with MS_DIRSYNC, too.
 
1 members found this post helpful.
Old 05-19-2011, 01:08 AM   #3
ravanan
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks Skaperen for your reply.
 
Old 05-19-2011, 01:15 AM   #4
ravanan
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Original Poster
Rep: Reputation: 0
But my doubt is we are using the same mount system call code in the 2.4 linux kernel and also in 2.6 linux kernel. why the mount operation is fast in 2.4 and not in 2.6?

And i'm having another doubt. when i insert my floppy into my machine with 2.6 kernel the time take to prepare the floppy takes 45 seconds of time, but in 2.4 kernel i took only 2-5 sec of time. where i'm doing mistake i don't know. whether i need to do any changes for the configuration.

Thanks in advance.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] IO operation too slow in linux. lakshmun Linux - Hardware 4 04-22-2011 05:07 AM
No route to host found during mount operation threezerous Linux - Networking 1 12-16-2009 10:38 PM
nfs mount not happening automatically pwabrahams Linux - Networking 4 07-10-2008 12:00 PM
Laptop - slow install and operation Alfie67 MEPIS 3 11-10-2006 06:31 AM
Something STRANGE is happening when I try to mount USB / floppies etc. yekrahs Fedora 4 09-15-2005 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration