while rehashing the same files over and over will work
just fine, it can be slow with a large number of large
files; this makes 'git/comit .' perform much better in
repos with a large number of large binary blobs.
compress when the log doubles in size, rather than
using a fixed size heuristic; this means that we
don't start compressing frequently as the log gets
big and the file system gets fragmented.
this happens in libframe:
/sys/src/libframe/frutil.c:80: x -= (x-f->r.min.x)%f->maxtab;
but there's no way to control when the user changes the
maxtab value, so it's samterm's responsibility to
sanitize it.
we were copying the owner and group of the parent dir into the fid
on create, but we forgot the mode; fix that, so that we don't check
perms against the wrong dir.
The Italian keyboard layout is ISO, and unlike the ANSI layout,
it has an extra key between Shift and Z, and the key above Enter,
which becomes vertical, is moved to the bottom left of it.
- the key between Shift and Z is mapped to `<`, and shift+`<` is mapped to `>`
- the old `>` (at the bottom left of Enter) is mapped to `ù`
- shift+`ù` is mapped to `§`
- the old shift+`"` is mapped to `°`
- altgr+`'` is mapped to backtick
- altgr+`ì` is mapped to `~`
- altgr+`e` is mapped to `€`
- shiftaltgr+`[` is mapped to `{`
- shiftaltgr+`]` is mapped to `}`
This seems to have been around but not compiled since the third edition.
Remove it and the accompanying SMBus machinery that is only used
for this driver.
When modifying a sparse file, it's possible to get
clobbers and clears to item s that don't exist; in
this case, we try to apply to an empty kvp, and
assert -- we should just not apply.
void
main(void)
{
uchar a[3];
float f = a[2] | a[1] | (a[0]/1.2);
USED(f);
}
the code above used to generate impossible
code in the linker like:
main: doasm: notfound from=34 to=35 (872) ORL X0,X1
main: doasm: notfound from=34 to=35 (872) ORL X0,X1
main: doasm: notfound from=34 to=35 (872) ORL X0,X1
with the change, the compiler correctly rejects it:
incompatible types: "UINT" and "DOUBLE" for op "OR"
i assume the BNUMBER in the type matrix must have been
a oversight.
do not add default route when address is
deprecated (preflt == 0).
delete previous default route on router change.
implement rfc4862 section 5.5.3 processing rules
in regard to remaining valid lifetime.
In addition to removing expired default routes,
ask devip to clean out expired addresses as well.
In the future, devip might do something more
sophisticated than just checking the valid life time
like also considering if the address is still begin
used by active connections.
we shouldn't need to defer reclamation for procs that
don't actually interact with the tree directly, especially
since if they send on a channel they can stall for a while.
This change covers three improvements:
- inline the limbo entry into the objects
being freed, meaning we don't need to
allocate, and thus can't fail to free
an object when we're out of memory
- Preallocate Bfree objects, for the same
reason above.
the build process could be cleaned up a lot more. the default.*.h headers are
basically only used in cross-compilation, but every usable arch has its default
header already, so all the mkfile effectively does is copy it to $objtype.h. it
would perhaps make more sense to just run mk on any new arch and copy to a new
default.$objtype.h and get rid of a lot of this stuff. but then it's not really
worth messing with this further, so leaving it as is.
We were inserting very oversized deletion messages when
removing a file, instead of inserting the right size
message. This also batches the insertions, reducing the
number of upserts.
37e65b331b
Was to adjust the compiler to better match the ISA w.r.t.
subtraction, but was overzelous and rewrote all additions instead of
just those with constants.
5390130426
Intended to restrict compiler generated immediate operations to only
those of which can be encodable by the ISA. However the check for
signed constants was incorrect and resulted in constants that do not
properly encode.
0c6fd079ce
Attempted to classify address literals to save on instruction
encoding, but this is actually not possible. We have to walk the
program first to derive some of the constants (INITDAT depends on
etext) so we can not classify them here. Instead we should just limit
address literals to 32 bits (with sign extension) as a worst case. It
would be possible in the future to do a pass over to program later and
find address literals that only need one instruction instead of two
but this works for now.
The peeophole optimizer was removing MOVL R0, A0
instructions before BSR (A0) because copyu()
decided all registers are being written (because
function calls clobber the registers).
For indirect calls, the register operand must
be correctly reported as being used (and then
clobbered).
Filesystems should ensure that the mount
spec (aname) is valid before handing out
an auth fid.
This avoids pointless authenticaiton
protocols being run just for the
mount later to fail.
This happens with our current /lib/namespace
file for the opportunistic line:
mount /srv/boot /n/other other
i got rid of redundant code, and added routines
to get the xform matrix out of an rframe, so it
can be stored and used separately or as part of
a composition of xforms.
also replaced the big example in the man page for
more concise, useful ones.
with a global dent cache, directory entries from different
trees can be cached. This almost works, but QID state can
change as the files get modified -- ownership, permissions,
and similar can get changed.
A global mount cache means that changes to a qid may leak
across mount boundaries. Don't do that.
when writing back data blocks, we didn't
read the data back from disk, and instead
just enqueued the block pointer; This means
that we don't have the Blk struct to set
the freed flag on, so we would commit every
IO operation to a data block.
This change opportunistically reaches into
the cache and flags the data block as dead,
so we can skip writeback.
we only need to enforce ordering or syncedness to disk when
writing out the blocks during sync, we don't need to prevent
mutation on the tree once the arenas and superblock are
serialized.
When churning through data blocks and writing out of order, we would
copy blocks and release them often, leading to gaps at the back of
the file. Retrying an allocation could also lead to allocating a block
in the same arena as the metadata.
This would leave gaps in the allocated files, which would cause seeks
when accessing the data later.
This set of changes allocates blocks that are expected to be accessed
sequentially from the start of the arena, and blocks that are expected
to be accessed out of order at the end of the arena.
For full data blocks (ie, where the write is at the end of the block),
we assume that the accesses will be sequential. For partial data blocks,
when the write offset is not at the end of the data block, we assume
that future appends are inbound, and we allocate the block in the non
sequential part of the arena. As a result, when we eventuall fill the
block, we will allocate the sequential block.
This doesn't help us too much if we have writes to files interleaved,
or we overwrite the same section of a file over and over, but it's
better than nothing.
len is ulong, hence &l[-len] makes no sense.
&l[-(uintptr)len] and l - len are correct.
igfx uses a fixed segment to extend its memory when stolen memory is
insufficient for the requested mode. this caused segment allocation
to always fail since no page in the loop would fall within the range.
modesetting then fails but the bottom of the screen stays garbled.
This is a kernel for the NXP LX2160A, specifically the SolidRun
Honeycomb board which is available for sale on the SolidRun
website.
It currently boots on U-Boot. UEFI support is planned. Build or
download the U-Boot firmware from the SolidRun site and then write
it to the on-board SD card. Then, plug in a USB with the honeycomb
image and proceed to install as normal. Only NVMe or USB storage
is supported (SATA is planned).
This kernel supports PCIe and USB. On-board ethernet and SFP are
not supported (yet). It uses 2GB of memory by default, but that
can be increased using *maxmem depending on how much RAM you have
in the system. As well, SMP is currently disabled until an
uncommon deadlock issue is fixed (could be a hardware issue, unknown
at this point).
we copied and pasted the structure of this from
cwfs, but they lay out the bits differently. We
fixed this for the other cases, but forgot this
one, which lead to exec being permitted when it
shouldn't have been.
in out of memory situations, clunkfid could run
out of memory and error; preallocating moves the
error to fscreate/fsopen, which are prepared to
handle them.
vertical scrolling now works in a line-wise manner,
just like in rio(1), sam(1) and friends. horizontal
scrolling showed problems with some line widths
where they got cut before showing the last
characters.
finally, pressing LMB or RMB and swiping while going
through any of the blocks caused a storm of plumbs
and visibility toggling (when over the expander line).
this doesn't happen anymore.
Currently we use millisecond ticks for time spent in each function.
This is not good enough for modern machines where fast functions could
be completed in a handful of nanoseconds. Instead let us just use the
raw ticks and store the cyclecfreq in the output prof data. This
requires that we enlargen the time section in the data to 8 bytes,
which broke the assumptions for struct allignment and required a
slight refactor of the code used to read it in prof(1). Since this is
a breaking change, we've devised a small format to communicate the
version for future revision of this format and this patch includes a
modification to file(1) for recognizing this format. Additionally
some minor improvements were made across the board.
When a function calls itself, the execution slot of its child is now
just added to its own time. This makes conceptual sense and also
reduces a big cause of depth inflation.
Current profiling size was 128k, and causes more frustration than it
is worth as demand paging makes this cheap. Assuming 64 bytes at
worst per Plink this will use ~16M of virtual address space on 64bit
systems.
POWER does not provided subtract immediate functions and
instead rely on negative addition. It was such that the linker
was the one who would go through and rewrite these to be negative
but it really should be done in the compiler while we still have
the width information.
* Add a handful of 64 bit classifications to 9l, along with instruction generation for each.
* 9c should avoid generating immediate instructions for 64 constants.
* libmach should know about 9l's generation to present a better disassembly.
* libmach now properly displays MOVD for moves between registers on 64 bit.
This was leftover from before 6c was
in /sys/src/cmd, as the mkfile adds this
to the include path. Now that we have 6c,
this subdirectory is never used.
Commit 9f755671fb broke
webseeding with the last block.
The haveiece() call at the end was because the inner
is not calling havepiece() on the last block as it
does not take the piece length into account.
Now, instead, fix the inner loop, making the code
more setright foward so we call havepiece() on the
last block.
The transition time in the timezone info file is,
confusingly, in local time and not UTC, so we need
to translate it before we do the comparison.
While we're here, revert the Australian timezone
change that made the offsets UTC, and add some test
to make sure we get this right.
This global "Mss" MIB element does not really exists,
and it makes no sense as the MSS is negotiated
per connection.
Put the InLimbo in the statistics table.
In limbo() function, once tpriv->nlimbo
reaches Maxlimbo, we'd try to re-use
Limbo entries from the head of the hash
chain. However, theres a special case
where our current chain contains only
a single entry. Then Limbo **l; points
to its next pointer, and writing:
*l = lp; would just yield in the entry
being linked to itself, leaking it.
The for(;;) loop in limborexmit() was wrong,
as the "continue" case would not advance
the lp pointer at all, (such as when
tpriv->nlimbo reaches > 100), we'd stop
cleaning out entries.
Handle Fsnewcall() returning nil case,
have to free Limbo *lp as we just removed
it from the hash table.
Add tpriv->nlimbo as "InLimbo" at the
end of /net/tcp/stats.
We where allocating the dialid and acceptid using:
rand()<<16 + rand()
this gives a biased values as rand() retuns a 15-bit
number. Instead, use two calls to nrand() to get
the full 32-bit unsigned range.