From: "EBo" <ebo@sandien.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>,
"erik quanstrom" <quanstro@quanstro.net>
Subject: Re: [9fans] corrupted update on 9vx
Date: Fri, 23 Apr 2010 18:01:51 -0600 [thread overview]
Message-ID: <twig.1272067311.37590@swcp.com> (raw)
In-Reply-To: <145bac50d1cc889e4e602cefa3be5478@kw.quanstro.net>
Sorry for the delay
> On Thu Apr 22 14:45:38 EDT 2010, steve@quintile.net wrote:
> > replica uses fcp which works multithreaded for speed.
> >
> > Perhaps the implementation of fswrite() #Z in 9vx uses a seek()
> > followed by a write() rather than pwrite() which is not thread safe.
>
> replica actually uses replica/applylog.c:^/worker internally, not
> fcp. but essentially, it's the same thing. it copies NBUF=8192
> bytes at a time with 16 parallel processes. #Z uses pwrite on non-sockets.
>
> in theory, since NBUF < SSIZE_MAX, pwrite should be atomic
> to normal files.
Thanks for the pointer. I'll try playing around with NBUF and also see if I
can play with the number of processes (thwack it to 1 for testing and see if
that helps).
> you're not using a fuse-based fs, are you?
no. I did have fuse installed, but it was only used by usermode-utilities,
and I have since removed both that and fuse.
> possible ways to debug:
> 1. reduce NBUF to PIPE_BUF=4096. guard against someone treating
> the fd as a pipe.
> 2. put a qlock in the UnixFd structure in devfs-posix.c. lock for all io.
If I recall correctly, qlock has not been ported to 9vx. Ahhh... I see that
it has. This saves me the hassles of porting it myself ;-)
Laters,
EBo --
next prev parent reply other threads:[~2010-04-24 0:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 17:32 [9fans] sam language question Rudolf Sykora
2010-04-22 17:55 ` [9fans] corrupted update on 9vx EBo
2010-04-22 18:44 ` Steve Simon
2010-04-22 18:53 ` erik quanstrom
2010-04-24 0:01 ` EBo [this message]
2010-04-22 18:21 ` [9fans] sam language question Rob Pike
2010-04-22 18:30 ` Rudolf Sykora
2010-04-22 18:24 ` yy
2010-04-22 18:32 ` Rudolf Sykora
2010-04-22 19:28 ` yy
2010-04-22 20:23 ` Rudolf Sykora
2010-04-22 22:04 ` roger peppe
2010-04-23 7:22 ` Rudolf Sykora
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=twig.1272067311.37590@swcp.com \
--to=ebo@sandien.com \
--cc=9fans@9fans.net \
--cc=quanstro@quanstro.net \
/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).