From: Rahul <rahul.theraja@gmail.com>
To: "Fawad Lateef" <fawadlateef@gmail.com>
Cc: kernelnewbies@nl.linux.org,
Shakthi Kannan <shakthimaan@gmail.com>,
linuxppc-embedded@ozlabs.org
Subject: Re: help in block drivers
Date: Sun, 22 Oct 2006 14:32:28 +0530 [thread overview]
Message-ID: <ff9652ca0610220202w4b0d831bu202ccff8ed941f2d@mail.gmail.com> (raw)
In-Reply-To: <1e62d1370610192213g7502709ufcc2bce6903040d8@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2266 bytes --]
On 10/20/06, Fawad Lateef <fawadlateef@gmail.com> wrote:
>
> Hello Rahul,
>
> First of all please don't do top-posting rather do bottom-posting. For
> more information search google.
oh sorry for that
On 10/19/06, Rahul Theraja <rahul.theraja@gmail.com> wrote:
> > Hello Shakthi Kannan,
> >
> > Thanks for the reply .
> >
> >
> > > > driver. I could not understand why the "sbd_request " is called even
> > though
> > > > i have given only one read call from user space file.
> > >
> > > Block device I/O transfer is done in blocks.
> > >
> > > > And also in the driver, in the function sbd_request() how does the
> > driver
> > > > get the parameters like sector, current_nr_sectors and buffer.
> > >
> > > VFS <-> SCSI <-> Block device?
> > >
>
> I think its VFS<->Buffer-Cache<->Block-Device and if drive is mounted
> then VFS<->FS<->Buffer-Cache<->Block-Device
>
> > > > i could move
> > > > furhter fastly.
> > >
> > > Fastly? IMHO, learning kernel development involves lot of patience.
> > >
> > > SK
> >
> >
> > Is it necessary to use kernel_thread() in block drivers.
> In drivers/block
> > loop.c i could see kernel_thread() being used but in floopy.c it is not
> > used. When is this kernel_thread() function is supposed to be used ? In
> the
> > sbd_device also the kernel_thread() is not used.
> >
>
> First in kernel-2.6.x its better to use kthread_*() rather than
> kernel_thread if threading is needed.
>
> Threading isn't necessary in any device until unless you need it. For
> example if your driver is emulating a device or performing IO directly
> then you don't need it, but if your driver is sending request to a
> device which generates interrupts after completing IO and you want to
> do some extra work after getting IO completion interrupt then you must
> use thread. As threads work in process-context, hence can do sleep and
> lengthy processing but interrupt-context shouldn't sleep or nor do
> long processing.
>
> For getting more understanding about different contexts like process,
> interrupt, softirqs contexts do search google.
>
> > Anyone please kindly clarify my doubts.
> >
>
> I hope you doubts are not clear.
thank you very much for all the help
> Thanks in Advance
> >
> > -Rahul
> >
>
> --
> Fawad Lateef
>
[-- Attachment #2: Type: text/html, Size: 3324 bytes --]
next prev parent reply other threads:[~2006-10-22 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ff9652ca0610190314u32a620b5qd0bd27a1b2700a22@mail.gmail.com>
[not found] ` <d16b1c80610190808y17c516dl35cfc8ca4a7a42ad@mail.gmail.com>
2006-10-19 16:23 ` help in block drivers Rahul Theraja
2006-10-20 5:13 ` Fawad Lateef
2006-10-22 9:02 ` Rahul [this message]
2006-10-24 9:37 ` Rahul
2006-10-24 12:14 ` Fawad Lateef
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff9652ca0610220202w4b0d831bu202ccff8ed941f2d@mail.gmail.com \
--to=rahul.theraja@gmail.com \
--cc=fawadlateef@gmail.com \
--cc=kernelnewbies@nl.linux.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=shakthimaan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).