Re: hd controller

2013-02-07 Thread Peter Teoh
good sharing. following up on your comments: in the kernel source: block/*.c are the files for block I/O related stuff - the layer just before ATA, implementing stuff like elevator I/O etc. drivers/block/*.c: hardware-specific files that understand how to talk to each type of harddisk. drivers

Re: hd controller

2013-02-07 Thread Valdis . Kletnieks
On Fri, 08 Feb 2013 07:48:39 +0800, Peter Teoh said: > So the drivers just literally concatenate these command into a string and > send it over to the device. The reason that good disk drivers are hard to write is because it isn't *just* literally concatenating the commands - it also has to do me

Re: hd controller

2013-02-07 Thread Peter Teoh
at the lowest level, SCSI/IDE/SATA all shared a common command base (perhaps with variations) - which is ATA command (because in drivers/ata/*.c u can find the symbol ATA_XXX_CMD in all the three different hardware architecture): Below is a an example specified by standard body (these command are

Re: hd controller

2013-02-07 Thread Anuz Pratap Singh Tomar
On Thu, Feb 7, 2013 at 6:13 PM, wrote: > On Thu, 07 Feb 2013 16:19:33 +0800, horseriver said: > > hi:) > > > >I am curious about how hd controller work . > >When user am reaing/writing hd ,it was implemented by sending command > >to hd controller's special port.Then ,how does the cont

Re: hd controller

2013-02-07 Thread Greg Freemyer
On Thu, Feb 7, 2013 at 1:13 PM, wrote: > On Thu, 07 Feb 2013 16:19:33 +0800, horseriver said: > > hi:) > > > >I am curious about how hd controller work . > >When user am reaing/writing hd ,it was implemented by sending command > >to hd controller's special port.Then ,how does the cont

Re: How the follow Starts in Android-Kernel

2013-02-07 Thread Abu Rasheda
On Tue, Feb 5, 2013 ... http://www.linux-arm.org/LinuxBootLoader/SMPBoot > > > for i86 http://duartes.org/gustavo/blog/post/how-computers-boot-up Does something similar exist for MIPS ? Thanks ___

Re: pr_info not printing message in /var/log/messages

2013-02-07 Thread Valdis . Kletnieks
On Thu, 07 Feb 2013 23:20:27 +0530, anish kumar said: > Other insteresting standard logs managed by syslog > are /var/log/auth.log, /var/log/mail.log. Other interesting *common* logs, as shipped pre-configured by some distros. They are hardly a "standard" (unless the definitions of these managed

Re: hd controller

2013-02-07 Thread Valdis . Kletnieks
On Thu, 07 Feb 2013 16:19:33 +0800, horseriver said: > hi:) > >I am curious about how hd controller work . >When user am reaing/writing hd ,it was implemented by sending command >to hd controller's special port.Then ,how does the controller know >a new command has received? > >I

hd controller

2013-02-07 Thread horseriver
hi:) I am curious about how hd controller work . When user am reaing/writing hd ,it was implemented by sending command to hd controller's special port.Then ,how does the controller know a new command has received? In this procedure , what work does the hd driver do ? thanks!

Re: pr_info not printing message in /var/log/messages

2013-02-07 Thread anish kumar
On Tue, 2013-02-05 at 16:18 -0500, valdis.kletni...@vt.edu wrote: > On Wed, 06 Feb 2013 04:43:20 +0800, Jimmy Pan said: > > > in fact, i've been always wondering what is the relationship between dmesg > > and /var/log/message. they diverse a lot... dmesg is provided by kernel using cat /proc/kmsg.

Re: thread concurrent file operation

2013-02-07 Thread Peter Teoh
To generalize further u can safely say that all synchronous operation have to be thread-safe, except for some APIs as listed here: http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_09.html linux kernel may guarantee thread-safety - but this only apply to serializing data at the

Re: thread concurrent file operation

2013-02-07 Thread Karaoui mohamed lamine
Very nice! 2013/2/7 Peter Teoh > Multiple concurrent write() by different thread is possible, as they all > can share the same file descriptor in a single similar process, and this is > not allowed. So nevertheless, the problem you posed is not > allowed/acceptable by the kernel, so Linus him

Re: thread concurrent file operation

2013-02-07 Thread Peter Teoh
Multiple concurrent write() by different thread is possible, as they all can share the same file descriptor in a single similar process, and this is not allowed. So nevertheless, the problem you posed is not allowed/acceptable by the kernel, so Linus himself fixed it: See here: http://lwn.net/A

Re: thread concurrent file operation

2013-02-07 Thread Karaoui mohamed lamine
Tahnks guys! 2013/1/30 Karaoui mohamed lamine > thanks, i think i get it. > > 2013/1/30 > > On Tue, 29 Jan 2013 20:16:26 +0100, you said: >> >> > Actually my question is : >> > Does POSIX specifies the fact that we need to use "lockf" to be able >> to do >> > read/write operation in different