From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: 9fans@cse.psu.edu
Subject: [9fans] userspace netlog style log file in fs?
Date: Mon, 3 Oct 2005 19:48:09 +0200 [thread overview]
Message-ID: <200510031748.j93HmA806250@zamenhof.cs.utwente.nl> (raw)
I'm turning my 802.1x thingy into an fs, using 9p(2),
and I'm now looking into adding a netlog-style
log file such that you can just 'cat /net/8021x/log'
and it will hang there in read until stuff is
added to the log. multiple readers should see
the same stuff.
I guess this amounts to
- keeping a ring buffer of log messages (a la netlog)
- keeping a queue of 'pending' read's --
read is the only thing for which completion
may have to be delayed, right?
- pending reads should 'complete' when stuff
is logged (i.e. something to read appears)
- pending reads should be cleaned away
when the fid is clunked
- deal with flushes?
- deal with slow readers that read slower
than the log gets updated, i.e. at a certain
moment they may ask for data that already has
been overwritten
I found inspiration in /sys/src/9/ip/netlog.c and
/sys/src/cmd/ssh/sshnet.c
(and other places mentioned in 9p(2))
Are there other things I might want to look at?
Are there particular traps I might want to avoid,
things to think of?
Sorry for these a bit vague, 'open' questions -
I'm sure I'll succeed to figure things out myself,
but if people have been there already I'd rather
not reinvent the wheel.
Also, I could imagine that such logging stuff might
be useful for other programs, if it could be
integrated easily.
Axel.
next reply other threads:[~2005-10-03 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-03 17:48 Axel Belinfante [this message]
2005-10-03 18:02 ` Russ 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=200510031748.j93HmA806250@zamenhof.cs.utwente.nl \
--to=axel.belinfante@cs.utwente.nl \
--cc=9fans@cse.psu.edu \
/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).