Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Carl Henrik Lunde <chlunde@ping.uio.no>
Cc: Francis Moreau <francis.moro@gmail.com>, fio@vger.kernel.org
Subject: Re: question about fork_main()
Date: Mon, 20 Apr 2009 08:45:14 +0200	[thread overview]
Message-ID: <20090420064514.GR4593@kernel.dk> (raw)
In-Reply-To: <ed038eb20904191816u4994898fyeaaad97a9d6147ad@mail.gmail.com>

On Mon, Apr 20 2009, Carl Henrik Lunde wrote:
> On Thu, Apr 9, 2009 at 20:49, Francis Moreau <francis.moro@gmail.com> wrote:
> > hello,
> >
> > I just took a look to fio source code (great tool BTW), and I'm
> > wondering about the fork_main() comment:
> >
> > /*
> > �* We cannot pass the td data into a forked process, so attach the td
> > �* and pass it to the thread worker.
> > �*/
> >
> > Since after a fork(2) the child inherits the attached shared memory
> > segments from its parent, I don't see the point of this comment.
> >
> > Could anybody enlight me ?
> 
> I think your observation is correct, this is not necessary, shmat in
> the child can be avoided.

Yes, I'm not quite sure why it does that anymore, it's been that way
since 2004/5 when fio got moved to its own repo...

-- 
Jens Axboe


  reply	other threads:[~2009-04-20  6:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 18:49 question about fork_main() Francis Moreau
2009-04-20  1:16 ` Carl Henrik Lunde
2009-04-20  6:45   ` Jens Axboe [this message]
2009-04-21 18:37   ` Francis Moreau
2009-04-21 19:01     ` Jens Axboe
2009-04-21 19:13       ` Francis Moreau

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=20090420064514.GR4593@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=chlunde@ping.uio.no \
    --cc=fio@vger.kernel.org \
    --cc=francis.moro@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