Commit graph

4141 commits

Author SHA1 Message Date
cinap_lenrek d48dcf08aa cc: provide fake realloc() for getenv() 2015-07-28 12:06:29 +02:00
cinap_lenrek 20da5094d9 kernel: remove obsolete comment from namec() 2015-07-28 10:01:05 +02:00
cinap_lenrek 4bd9ed80c3 kernel: export mntattach() from devmnt.c avoiding bogus struct passing and special case in namec()
we already export mntauth() and mntversion(), so why not stop
being sneaky and just export mntattach() so bindmount() and
devshr can just call it directly with proper arguments being
checked.

we can also avoid handling #M attach specially in namec()
by having the devmnt's attach function do error(Enoattach).
2015-07-28 09:52:21 +02:00
cinap_lenrek 311a99e23b ether79c970: set mbps for proper queue sizes, assume gigabit ethernet for vmware 2015-07-28 03:30:21 +02:00
cinap_lenrek b506c6489b lib9p: return "write prohibited" error as documented in 9p(2) when srv->write is nil (thanks silasm) 2015-07-28 01:24:02 +02:00
cinap_lenrek 652a641704 kernel: clunk the cache when removing cache flag on a channel, only call cread() chen CCACHE flag is set
to avoid double caching, attachimage() and setswapchan() clear
the CCACHE flag on the channel but this keeps the read ahread
state of the cache arround (until the chan gets closed), so also
call cclunk() to detach the mcp and free the read ahead state.

avoid the call to cread() when CCACHE flag is clear.
2015-07-27 06:42:41 +02:00
cinap_lenrek ff494b954f devmnt: use c->iounit instead of msize-IOHDRSZ to chunk reads and writes, reduce memory overhead for Mntrpc, mntalloc lock
use the actual iounit returned from Ropen/Rcreate to chunk reads and writes
instead of c->mux->msize-IOHDRSZ.

dont preallocate the rpc buffers to msize, most 9p requests are rather small
(except Twrite of course). so we allocate the buffer on demand in mountio()
with some rounding to avoid frequent reallocations.

avoid malloc()/free() while holding mntalloc lock.
2015-07-27 04:33:46 +02:00
cinap_lenrek 23f7840056 devmnt: dont reset readahead window when requested offset still has pending rpc 2015-07-26 13:55:51 +02:00
cinap_lenrek 6617c63a37 kernel: pipelined read ahead for the mount cache
this changes devmnt adding mntrahread() function and some helpers
for it to do pipelined sequential read ahead for the mount cache.

basically, cread() calls mntrahread() with Mntrah structure and it
figures out if we where reading sequentially and if thats the case
issues reads of c->iounit size in advance.

the read ahead state (Mntrah) is kept in the mount cache so we can
handle (read ahead) cache invalidation in the presence of writes.
2015-07-26 05:43:26 +02:00
cinap_lenrek 918cb76040 page: fix deadlock, nil vs 0 for pointer comparsion, cleanup 2015-07-24 11:45:48 +02:00
cinap_lenrek 9e196fd0e2 libsec: increase handshake message buffer size (MaxChunk) to 32K (thanks sl)
_sl → webfs doesn't like packetfire.org: '/mnt/web/body' 0 No status tls: local handshake message too long 30781 16384
2015-07-24 06:18:59 +02:00
stanley lieber 5635ac3f68 fortunes: go away. 2015-07-22 21:35:50 -04:00
cinap_lenrek ab4b7c2573 ip/httpfile: fix flushes, fix concurrent reads, set error string
Tflush handling was wrong, we cannot respond to the old
request if we have not actually removed the req from the
in progress block queue.

when reads are issued concurrently, we have to set b->len
before the block is inserted into the inprogress list.
otherwise findblock() is unable to find it and no requests
can be queued on the block. this caused the same offset
to be downloaded multiple times.

set the errstr in getrange() so in case of an error, we dont
get some random previous error string.
2015-07-23 03:24:39 +02:00
cinap_lenrek 497daed116 kernel: make sure fd is in range in fdclose()
as the Fgrp can be shared with other processes, we have to
recheck the fd index after locking the Fgrp in fdclose()
to make sure not to read beyond the bounds of the fd array.
2015-07-23 22:56:49 +02:00
cinap_lenrek 323184d775 kernel: simplify syspipe() 2015-07-23 22:34:58 +02:00
cinap_lenrek ff03b72ed5 devaoe: more nil vs. 0 2015-07-23 22:05:46 +02:00
cinap_lenrek 0b3fd7c052 devaoe: fix off by one in aoeerror(), consistent use of nil for pointers, error handling 2015-07-22 21:56:11 +02:00
cinap_lenrek 769b3f1c2f kernel: consistent use of nil for pointer in sysfile.c 2015-07-22 21:54:07 +02:00
cinap_lenrek 1fcc84d072 kernel: cleanup chan.c to consistenly use nil instead of 0 for pointers 2015-07-22 19:17:10 +02:00
cinap_lenrek 8db5af02d8 kernel: make sure the swap device has a reasonable capacity in setswapchan() 2015-07-22 19:15:51 +02:00
cinap_lenrek 47bb311d39 devmnt: do not use user buffer to update the mount cache
using the user buffer has a race where the user can modify
the buffer from another process before it is copied into the cache.
this allows poisoning the cache for every file where the user
has read access.

instead, we update the cache from kernel memory.
2015-07-19 20:25:42 +02:00
cinap_lenrek 157b7751e7 devstream: fix mistake 2015-07-19 03:36:53 +02:00
cinap_lenrek 64136bfd16 stream(3): fix reference 2015-07-19 03:34:08 +02:00
cinap_lenrek 9150d2773f fcp: use iounit() to determine buffer size, reduce number of worker procs to 8 2015-07-19 03:32:38 +02:00
cinap_lenrek 1d93677070 cp: experimental stream support 2015-07-19 03:32:09 +02:00
cinap_lenrek 71cda09d1e devstream: fast sequential file access with 9p pipelining experiment 2015-07-19 03:31:17 +02:00
cinap_lenrek 0bdfa3699d pc: check Sse (bit 25) in cpuiddx before enabling fxsr in cr4 (fixes crash on the pentium II) 2015-07-16 08:51:06 +02:00
cinap_lenrek e6d84a3fa6 aux/cpuid: make sure extended feature bits are available (fixes crash on the pentium II) 2015-07-16 08:49:24 +02:00
cinap_lenrek bae3ac29fc devproc: make sure statbufread offset wont turn negative 2015-07-15 17:09:05 +02:00
cinap_lenrek ea7bca1829 fcp: fix wrong write pointer offset when read returns less than DEFB bytes 2015-07-14 20:44:34 +02:00
cinap_lenrek 2aa2f9f359 kernel: remove debugalloc.c 2015-07-14 06:51:02 +02:00
cinap_lenrek 90bd02d5af mk9660: write data in alphabetical order
*after* writing, the directory tree gets alphabetically sorted for
path table. this causes data to not be in the same order as it was
written causing seeks when taring up the filesystem.

so instead write the files in alphabetical order as well to better
match the directory sorting.
2015-07-14 22:33:27 +02:00
cinap_lenrek 2e85e32886 9660srv: keep data and metadata separate in the cache with a tag
data on the disk is layed out sequentially and directory information
is at the end of the disk. we want to keep data and metadata separated
so that reading large sequential files will not evict the directory
information from the cache causing long seeks.

for that, we tag the clusters (an 8th for metadata, and the rest
for data) and getbuf() will only evict clusters of the same tag.
2015-07-14 22:23:16 +02:00
cinap_lenrek f5688dd6c9 9660srv: go back to 128k clusters
doing tests taring up 9front.iso shows the following:

lowering the cluster size back to 128k avoids over half the
reads. 837888 sectors read for 512k vs. 347712 sectors with
128k cluster size.
2015-07-13 18:37:56 +02:00
cinap_lenrek 41372f346a httpfile: fix evictblock() so we wont consume all the memory 2015-07-13 05:51:04 +02:00
cinap_lenrek 39c9f1abbb libFLAC: fix compiler warnings by properly declaring void function arguments 2015-07-13 02:56:51 +02:00
cinap_lenrek bab59e5749 python: HAVE_STDINT_H 1 2015-07-13 02:38:05 +02:00
cinap_lenrek 737c3edeba ape: add stdint.h, fix SSIZE_MAX and add SIZE_MAX to limits.h 2015-07-13 02:36:48 +02:00
cinap_lenrek cd9da74cbc cpp: search source file directory first for quoted #include (thanks Ori_B)
foo.c includes bar/bar.h, which includes "baz.h"; it wants bar/baz.h
meanwhile, it also includes meh/quux.h, which includes "baz.h"; it wants meh/baz.h
2015-07-13 00:54:56 +02:00
cinap_lenrek a5efa0e252 ether82563: fix multicast filter (based on openbsd em(4) driver) 2015-07-12 19:21:53 +02:00
cinap_lenrek cbd1ca6877 page: make lookahead fetch work in backwards direction 2015-07-11 02:42:14 +02:00
cinap_lenrek 1d5a2aa487 tftpd: count only options we understand so we wont send empty oack message 2015-07-11 02:35:49 +02:00
cinap_lenrek 0f5f226ba1 etherrt2860: add multicast stub 2015-07-11 02:34:28 +02:00
cinap_lenrek 2e5e5cde71 etheriwl: add multicast stub 2015-07-11 02:33:57 +02:00
cinap_lenrek b4f9ca6c97 etherwpi: dont enable transmit power for invalid channels, add multicast stub 2015-07-11 02:33:16 +02:00
cinap_lenrek 266057f0da wifi: reflect current transmit rate in mbps 2015-07-10 19:13:15 +02:00
cinap_lenrek 7cf2321ffb etherwpi: afra support 2015-07-10 18:59:57 +02:00
cinap_lenrek 34a0f4660d etheriwl: dont clear descriptors after completion 2015-07-10 18:50:37 +02:00
cinap_lenrek b5655b7247 wifi: adjust transmit rate on error (for etheriwl), small mkfile changes
Wnode gets two new counters: txcount and txerror
and actrate pointer that will be between minrate
and maxrate.

driver should use actrate instead of maxrate for
transmission when it can provide error feedback.

when a driver detects a transmission failed, it calls
wifitxfail() with the original packet. wifitxfail() then
reduces wn->actrate.

every 256th packet, we optimistically increase wn->actrate
before transmitting.
2015-07-10 09:04:05 +02:00
cinap_lenrek 4ec93f94c9 kernel: use HDR_MAGIC constant to handle Exec header extension, make rebootcmd() handle AOUT_MAGIC macro 2015-07-10 23:56:39 +02:00