The NetBSD Project

CVS log for src/lib/libpuffs/framebuf.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libpuffs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.35 / (download) - annotate - [select for diffs], Wed Jun 14 16:39:41 2017 UTC (2 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-0-RC1, netbsd-9, HEAD
Changes since 1.34: +9 -14 lines
Diff to previous 1.34 (colored)

remove now unnecessary casts.

Revision 1.34 / (download) - annotate - [select for diffs], Wed May 31 17:56:00 2017 UTC (2 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.33: +7 -7 lines
Diff to previous 1.33 (colored)

Adjust to prototype.

Revision 1.32.22.1 / (download) - annotate - [select for diffs], Thu May 11 02:58:33 2017 UTC (2 years, 7 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.32: +19 -9 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

Sync with HEAD

Revision 1.33 / (download) - annotate - [select for diffs], Tue May 9 21:15:30 2017 UTC (2 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2
Changes since 1.32: +19 -9 lines
Diff to previous 1.32 (colored)

Only add a write filter for sockets. It is not supported for vnodes, or
for 1/2 closed fifos (which we both have now).

Revision 1.30.6.2 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:16 2012 UTC (7 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.30.6.1: +3 -3 lines
Diff to previous 1.30.6.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

sync with head

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jun 25 22:32:47 2012 UTC (7 years, 5 months ago) by abs
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: prg-localcount2
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)

Revision 1.30.6.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:31 2012 UTC (7 years, 7 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.30: +4 -5 lines
Diff to previous 1.30 (colored)

sync with head

Revision 1.31 / (download) - annotate - [select for diffs], Mon Dec 19 15:36:26 2011 UTC (7 years, 11 months ago) by riastradh
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.30: +4 -5 lines
Diff to previous 1.30 (colored)

Fix error reporting in puffs_framev_enqueue_waitevent and callers.

ok christos

Revision 1.30 / (download) - annotate - [select for diffs], Tue Jan 12 18:42:38 2010 UTC (9 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache
Changes since 1.29: +7 -7 lines
Diff to previous 1.29 (colored)

Add convenience routine puffs_unmountonsignal(), which does exactly that.

Revision 1.28.6.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:39:24 2008 UTC (11 years, 2 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.28: +2 -6 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Sep 4 15:30:36 2008 UTC (11 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.28: +2 -6 lines
Diff to previous 1.28 (colored)

Fix double free when i/o descriptor is violently closed.  Bug was
introduced in rev 1.27.

fix provided by Taylor R Campbell in lib/39353

Revision 1.20.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 00:40:29 2008 UTC (11 years, 8 months ago) by matt
Branch: matt-armv6
Changes since 1.20.2.2: +28 -22 lines
Diff to previous 1.20.2.2 (colored) next main 1.21 (colored)

sync with HEAD

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 29 10:07:29 2008 UTC (11 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-1, wrstuden-revivesa-base, matt-armv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Branch point for: wrstuden-revivesa
Changes since 1.27: +14 -8 lines
Diff to previous 1.27 (colored)

Fix a weirdosity in the framebuf gotfb interface: hand buffer
ownership to the called routine instead of keeping it.  This means
that callees must now destroy the buffer once they are done with it.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Jan 28 18:35:50 2008 UTC (11 years, 10 months ago) by pooka
Branch: MAIN
Changes since 1.26: +16 -16 lines
Diff to previous 1.26 (colored)

Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and
switched to every time the request was being processed.  Now requests
borrow the mainloop context and switch only if/when they yield.
This takes two context switches away from a file system request
bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g.
psshfs).

The interfaces for manually executing requests changed a bit:
puffs_dispatch_create() and puffs_dispatch_exec() must now be used.
They are not tested, as nothing in-tree wants them and I doubt
anyone else is really interested in them either.

Also do some misc code cleanup related to execution contexts.  The
"work-in-progress checkpoint" committed over a year ago was starting
to look slightly weed-infested.

Revision 1.20.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:36:45 2008 UTC (11 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.20.2.1: +78 -37 lines
Diff to previous 1.20.2.1 (colored)

sync with HEAD

Revision 1.26 / (download) - annotate - [select for diffs], Sun Dec 16 20:02:57 2007 UTC (11 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.25: +6 -6 lines
Diff to previous 1.25 (colored)

* nuke puffs_cc_get{specific,usermount} for good
* move prototypes for puffs_docc and puffs_dopufbuf into the
  public header, as they are should be exposed

Revision 1.25 / (download) - annotate - [select for diffs], Tue Dec 4 21:24:11 2007 UTC (12 years ago) by pooka
Branch: MAIN
CVS Tags: cube-autoconf-base, cube-autoconf
Changes since 1.24: +73 -32 lines
Diff to previous 1.24 (colored)

Part 3/n of extensive changes to message handling:

Get rid of the original puffs_req(3) framework and use puffs_framebuf(3)
instead for file system requests.  It has the advantage of being
suitable for transporting a distributed message passing protocol
and therefore us being able to run the file system server on any
host.

Ok, puffs is not quite here yet: libpuffs needs to grow request
routing support and the message contents need to be munged into a
host independent format.  Saying which format would be telling,
but it might begin with an X, end in an L and have the 13th character
in the middle.  Keep an eye out for the sequels: Parts 3+m/n.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Dec 4 17:21:24 2007 UTC (12 years ago) by pooka
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

realloc() len+incr, not offset+incr.  Makes space reservation
actually work properly.

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:11:51 2007 UTC (12 years, 1 month ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.20: +21 -11 lines
Diff to previous 1.20 (colored)

sync with HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Thu Sep 6 18:01:34 2007 UTC (12 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.22: +2 -5 lines
Diff to previous 1.22 (colored)

document puffs_framev_framebuf_ccpromote()

Revision 1.22 / (download) - annotate - [select for diffs], Thu Sep 6 16:08:55 2007 UTC (12 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.21: +6 -4 lines
Diff to previous 1.21 (colored)

Give cmpframe() the ability to shortcircuit the comparison loop by
signalling back that the buffer under examination is not a response
at all.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Sep 1 16:42:42 2007 UTC (12 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.20: +17 -6 lines
Diff to previous 1.20 (colored)

Add gotframe callback, which is called if an incoming frame matches
no outstanding request.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Aug 25 09:30:41 2007 UTC (12 years, 3 months ago) by pooka
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.19: +8 -9 lines
Diff to previous 1.19 (colored)

Pass usermount to errnotify, it might not be available there through
other structures.  CID 4496

Revision 1.19.4.2 / (download) - annotate - [select for diffs], Sat Jul 21 09:29:08 2007 UTC (12 years, 4 months ago) by pooka
Branch: matt-mips64
Changes since 1.19.4.1: +1018 -0 lines
Diff to previous 1.19.4.1 (colored) to branchpoint 1.19 (colored) next main 1.20 (colored)

Return -1 and errno from puffs_framev_enqueue_waitevent instead of
a direct error value.

Revision 1.19.4.1, Sat Jul 21 09:29:07 2007 UTC (12 years, 4 months ago) by pooka
Branch: matt-mips64
Changes since 1.19: +0 -1018 lines
FILE REMOVED

file framebuf.c was added on branch matt-mips64 on 2007-07-21 09:29:08 +0000

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jul 21 09:29:07 2007 UTC (12 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64
Changes since 1.18: +10 -6 lines
Diff to previous 1.18 (colored)

Return -1 and errno from puffs_framev_enqueue_waitevent instead of
a direct error value.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 20 14:55:42 2007 UTC (12 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.17: +4 -5 lines
Diff to previous 1.17 (colored)

simplify send loop

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jul 20 13:14:55 2007 UTC (12 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.16: +126 -11 lines
Diff to previous 1.16 (colored)

Add puffs_framev_enqueue_waitevent, which waits for read/write/error
events from an i/o descriptor.  It yields until an event happens
and continues execution when the event loop notices the event has
happened.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 8 17:24:41 2007 UTC (12 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

g/c leftover

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jul 8 11:24:58 2007 UTC (12 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.14: +10 -11 lines
Diff to previous 1.14 (colored)

make notifyfunction optional and do not call removeonclose() if
none is given.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jul 7 21:13:41 2007 UTC (12 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.13: +217 -49 lines
Diff to previous 1.13 (colored)

Make puffs_framebuf better suited from environments with multiple sources:

* in addition add/remove, allow enable/disable, which can be used
  to control events for descriptors without having to remove all the
  data associated with them
* add directsend/receive, which can be used to pass the same buffer
  from the caller to read/writeframe and back again
* add flags to enqueue functions and allow urgent buffers to be
  processed as the next PDU

Revision 1.13 / (download) - annotate - [select for diffs], Sun May 20 19:56:56 2007 UTC (12 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.12: +27 -2 lines
Diff to previous 1.12 (colored)

Introduce puffs_framev_framebuf_ccpromote, which can be used to
turn a reference to puffs_framebuf in the file system from a
cb/justsend operation to a cc wait, should the file system find
itself desiring the result.

Revision 1.12 / (download) - annotate - [select for diffs], Sun May 20 16:24:37 2007 UTC (12 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

Change the signature of puffs_respcmp to return -1,0,1 for smaller,
equal, larger, respectively instead of 0/1 for non/equal.  This
will allow sorting the buffers for faster matching in libpuffs.
While here, change the name from respcmp to framecmp, as that better
reflects the purpose.

NOTE!  there is no obvious way to make compilation fail for file
systems which may already be using this feature (although I don't
think there are any outside our tree, as the feature is two weeks
old).  Nevertheless, non-updated file systems will fail very quickly.

Revision 1.11 / (download) - annotate - [select for diffs], Sat May 19 11:01:21 2007 UTC (12 years, 6 months ago) by pooka
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

Allocate buf in 4k chunks instead of 64k chunks.  If we are seriously
reclaiming and the network/server is slow, we might have thousands
of buffers allocated at the same time causing the process to run
out of vm space.  Rate limiting the number of outstanding ops would
be a nicer choice, but that requires more complex changes.

Revision 1.10 / (download) - annotate - [select for diffs], Wed May 16 10:04:08 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)

Add error parameter to puffs_framev_cb to signal if there is a
result of if the function should just do resource cleanup.

Revision 1.9 / (download) - annotate - [select for diffs], Wed May 16 09:41:04 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

switch the arbitrary default errno value for network i/o from
ECONNABORTED to ECONNRESET, which is at least a little bit better

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 15 13:44:46 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.7: +176 -82 lines
Diff to previous 1.7 (colored)

Step 3 and currently final step of a more general purpose event loop:
support removal and addition of i/o file descriptors on the fly.

* detect closed file descriptors
* automatically free waiters of a dead file descriptor
* give the file server the possibility to specify a callback which
  notifies of a dead file descriptor
* move loop function to be a property of the mainloop instead of
  framebuf (doesn't change effective behaviour)
* add the possibility to configure a timespec parameter which
  attempts to call the loop function periodically
* move the event loop functions from the puffs_framebuf namespace
  to puffs_framev to differential between pure memory management
  functions

Revision 1.7 / (download) - annotate - [select for diffs], Sat May 12 07:44:58 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.6: +4 -3 lines
Diff to previous 1.6 (colored)

use size_t instead of int to calm over-eager lint

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 11 21:27:13 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.5: +49 -185 lines
Diff to previous 1.5 (colored)

Step 2 of general-purpose eventloop: get rid of puffs_framebuf_eventloop().
puffs_mainloop() now handles that functionality as well.

Revision 1.5 / (download) - annotate - [select for diffs], Fri May 11 16:22:38 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.4: +266 -67 lines
Diff to previous 1.4 (colored)

Step 1 in moving towards a general-purpose eventloop: allow the
framebuf event loop to take n i/o fd's as parameters and also allow
dynamic add/remove of fd's.  (not tested except for one fd, but more
changes coming soon)

Revision 1.4 / (download) - annotate - [select for diffs], Wed May 9 18:36:52 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Remove the puffs_usermount argument from puffs_req_handle().  It can
be found from the other arguments and this way puffs_req_handle() is
more symmetric with the other puffs_req() routines.

Revision 1.3 / (download) - annotate - [select for diffs], Sun May 6 10:54:41 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.2: +9 -2 lines
Diff to previous 1.2 (colored)

implement the conveniently-already-prototyped puffs_framebuf_remaining(),
which is just shorthand for tellsize() - telloff()

Revision 1.2 / (download) - annotate - [select for diffs], Sun May 6 10:21:45 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN
Changes since 1.1: +4 -4 lines
Diff to previous 1.1 (colored)

Remove the user-specified argument for the framebuf loop callback.
It can be generated through other means if it is desired.

Revision 1.1 / (download) - annotate - [select for diffs], Sat May 5 15:48:18 2007 UTC (12 years, 7 months ago) by pooka
Branch: MAIN

Add puffs "frame buffers", which are an abstraction of the buffering
and event handling mechanisms required in file servers with blocking
I/O backends.  puffs_framebuf is built on the concept of puffs_cc
and uses those to multiplex execution where needed.

File systems are required to implement three methods:
  * read frame
  * write frame
  * compare if frame is a response to the given one

Memory management is provided by puffs_framebuf, but the file
systems must still, of course, interpret the protocol and do e.g.
byte order conversion.

As always, puffs_framebuf is work in progress.  Current users are
mount_psshfs and mount_9p.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>