linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Fajun Chen <fajunchen@gmail.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	linux-scsi@vger.kernel.org, Tejun Heo <htejun@gmail.com>
Subject: Re: Process Scheduling Issue using sg/libata
Date: Sun, 18 Nov 2007 14:54:26 -0500	[thread overview]
Message-ID: <47409872.3060500@rtr.ca> (raw)
In-Reply-To: <8202f4270711181114w67632260la995daf65f507313@mail.gmail.com>

Fajun Chen wrote:
>..
> I verified your program works in my system and my application works as
> well if changed accordingly. However, this change (indirect IO in sg
> term) may come at a performance cost for IO intensive applications
> since it does NOT utilize mmaped buffer managed by sg driver.  Please
> see relevant sg document below:
> http://sg.torque.net/sg/p/sg_v3_ho.html#id2495330
> http://sg.torque.net/sg/p/sg_v3_ho.html#dmmio
> As an example, sg_rbuf.c in sg3_util package uses SG_FLAG_MMAP_IO flag
> in SG_IO. Please see source code attached. I also noticed that
> MAP_ANONYMOUS is NOT used in mmap() call in sg_rbuf.c, which may not
> be desirable as you pointed out in previous emails. So this brings up
> an interesting sg usage issue: can we use MAP_ANONYMOUS with
> SG_FLAG_MMAP_IO flag in SG_IO?
..

The SG_FLAG_MMAP works only with /dev/sg* devices, not /dev/sd* devices.
I don't know which kind you were trying to use, since you still have
not provided your source code for examination.

If you are using /dev/sg*, then you should be able to get your original mmap()
code to work.  But the behaviour described thus far seems to indicate that
your secret program must have been using /dev/sd* instead.

Cheers

  reply	other threads:[~2007-11-18 19:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-17  0:49 Process Scheduling Issue using sg/libata Fajun Chen
2007-11-17  3:02 ` Tejun Heo
2007-11-17  6:14   ` Fajun Chen
2007-11-17 17:13     ` James Chapman
2007-11-17 19:37       ` Fajun Chen
2007-11-17  4:30 ` Mark Lord
2007-11-17  7:20   ` Fajun Chen
2007-11-17 16:25     ` Mark Lord
2007-11-17 19:20       ` Fajun Chen
2007-11-17 19:55         ` Mark Lord
2007-11-18  6:48           ` Fajun Chen
2007-11-18 14:32             ` Mark Lord
2007-11-18 19:14               ` Fajun Chen
2007-11-18 19:54                 ` Mark Lord [this message]
2007-11-18 22:29                   ` Fajun Chen
2007-11-18 23:07                     ` Mark Lord
2007-11-19 16:40                       ` James Chapman
2007-11-19 16:51                         ` Tejun Heo
2007-11-19 17:17                           ` Alan Cox

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=47409872.3060500@rtr.ca \
    --to=liml@rtr.ca \
    --cc=fajunchen@gmail.com \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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).