menu name, ie. "(unnamed Ext2 File System)" could become "(12.5 GB Ext2 File System)".
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26242 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Missing backslash in UPDATE_THREAD_KERNEL_TIME() macro. Caused the
thread's kernel time never to be updated when the thread left the
kernel. The time would be added to the user time instead.
* Changed semantics of thread_at_kernel_exit(). It leaves interrupts
disabled when returning, now. All code using it would disable
interrupts afterwards anyway, and inbetween the thread could be
interrupted causing two more time updates (or actually not causing
them erroneously).
* The code in x86's interrupt handler entry (int_bottom) also checks
thread::in_kernel now, to determine whether the thread was already
considered to be in userland. This is necessary since the sysexit
instruction doesn't reenable interrupts, so that we have to do that
with the preceeding instruction. Hence an interrupt can occur
inbetween, which would incorrectly add the interrupt's kernel time
to the thread's user time.
* For userland threads team_create_thread_start() didn't invoke
thread_at_kernel_exit() or any equivalent. We do that in
arch_thread_enter_userspace() now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26240 a95241bf-73f2-0310-859d-f6bbb57e9c96
are high that Pe is installed, if not, StyledEdit is used anyways. Also
Firefox is more likely to be present on these days images than NetPositive.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26238 a95241bf-73f2-0310-859d-f6bbb57e9c96
there is only one heap_allocator for each heap class. Instead of adding
complete allocators, individual areas can now be added to existing allocators.
This removes a lot of complexity in the frontend code and avoids the previous
duplications wasting resources (allocator lock, bin sizes, bin list).
The pages are now managed in heap_area structures that are attached to areas.
They store the page table, page free lists and local variables. The same
mechanism as used for heap_pages is now used for heap_areas too, i.e. they
are kept in a sorted list where the fullest but not yet completely full area
is always at the top. This favors areas to become completely full and other,
not as frequently used areas, to become completely empty over time so they can
be freed. Full areas are removed from the list, so they do not need to be
looked at/skipped when allocating new pages. Through this mechanism and as
there are no allocator lists anymore that grow bigger over time, allocations
should be far more scalable. Note that actually removing areas once they are
not needed anymore is still not implemented, but it is now a relatively easy
addition whereas previously it would have killed the whole design.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26237 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Since there is no "Haiku license", I replaced that with a reference to the
MIT license as usual.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26236 a95241bf-73f2-0310-859d-f6bbb57e9c96
Patch by Mika Lindqvist. Could we give give him Commit access?
I am getting daily patches from him with fixes and new features.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26227 a95241bf-73f2-0310-859d-f6bbb57e9c96
the thread issuing the command called acquire_sem_etc() on the semaphore
that the interrupt handler would otherwise release. The semaphore is now
released unconditionally, but to prevent the race condition that the
B_RELEASE_IF_WAITING_ONLY was trying to avoid, it is released with the
spinlock held.
* The error interrupt handler did not reset the fCommandsActive flag, but
it seemed to us like it should do that.
* WaitForTransfer now also acquires the spinlock to reset fCommandsActive,
which may be unnecessary but does not harm either.
* Cleanup of some long lines, sorry for mixing that with the actual fix.
Fixes bug #2359 (long pauses when accessing the disk).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26223 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Turn off text cursor when switching to text mode.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26222 a95241bf-73f2-0310-859d-f6bbb57e9c96
them with the ROUNDUP macro that was specifically made for this task so that
too tired developers do not mess up the calculations...
* Don't use area allocation during kernel startup (not that it really happened).
* Minor simplification of similar calculations in heap_attach().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26221 a95241bf-73f2-0310-859d-f6bbb57e9c96
contiguous pages, it will request growing even if there are still more than
10% free pages available. Previously that case was not handled anymore and the
allocation would have just failed. Note that this is a pretty rare case, as
there are no "large" allocations happening in either the small or large heap
classes, but only in the huge one for allocations between 128KB and 1MB.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26220 a95241bf-73f2-0310-859d-f6bbb57e9c96
does in fact happen, as there are objects used in the kernel that allocate
with new, which in turn uses the heap. The OpenHashTable used from the slab
allocator hit this case during an svn checkout here, because it grows it's new
allocated list by doubling the list size. Added some unconditional debug
output for those cases to monitor the usage for now. All of that not yet really
tested though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26216 a95241bf-73f2-0310-859d-f6bbb57e9c96
that looks like a compiler bug to me, though.
* Pulled struct data_stream out of the union (now called ext2_data_stream),
based on a patch by Maurice, thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26214 a95241bf-73f2-0310-859d-f6bbb57e9c96
ext2_super_block::first_data_block must be used; the superblock offset
doesn't matter if the block size is greater than 2KB.
* Fixed block access beyond the 4GB limit - we need to cast the block to
a 64 bit type in ext2_get_file_map() before shifting it.
* Tested with various larger ext3 disks, and everything seems to work fine.
* Added some optional debug output.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26213 a95241bf-73f2-0310-859d-f6bbb57e9c96
(it didn't really work previously anyway). The only alignment really used seems
to be B_PAGE_SIZE, which happened to always work out before, because anything
larger would have been allocated using individual pages anyway. Since larger
bins are now available and with kernel heap leak checking enabled an allocation
of B_PAGE_SIZE with B_PAGE_SIZE alignment is actually a bit bigger than
B_PAGE_SIZE, it got into the 5KB bin, which didn't guarantee the alignment
anymore. This would have caused a tripple fault on boot when kernel heap leak
checking was enabled. The alignment is now taken into account when picking
the bin for the allocation. Added a more detailed TODO as to why this isn't
the best thing (wastes space) and how it could be changed if deemed necessary.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26212 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented the needed fs API hooks to support identifying partitions
(so ReiserFS partitions appear in the Tracker Mount menu now).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26211 a95241bf-73f2-0310-859d-f6bbb57e9c96
serve, bin sizes and page size. This minimizes the amount of "large"
allocations made in heaps that don't have a bin for the allocation size
(combining multiple pages). This is desirable as such large allocations
are generally pretty inefficient, and also because it separates larger from
smaller allocations better, making the chance of a heap becoming empty higher.
For now there are three heap classes "small", "large" and "huge", with a
predefined set of bin sizes for each. This might need some finetuning later on.
Reduce the grow size to 4MB though as the allocations should now be spread
across heap classes which each grow on their own.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26210 a95241bf-73f2-0310-859d-f6bbb57e9c96
allows for dynamic (heap)page sizes. It's currently just set to B_PAGE_SIZE
but I'm expermienting with the creation of differently sized heaps that could
use dynamic page sizes with that.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26203 a95241bf-73f2-0310-859d-f6bbb57e9c96
Report the index where the event opcode pair has been found.
Currently server was expecting them to be the first entry of the request
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26198 a95241bf-73f2-0310-859d-f6bbb57e9c96
the cancel, it wasn't actually done. This could bring a device out of sync in
the case timeouts actually happened (which shouldn't be a commen case).
Fixed that and increased the timeout to 2 seconds in favor of slower devices.
Might need some fine tuning later still.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26197 a95241bf-73f2-0310-859d-f6bbb57e9c96
Avoid unhandled event in the bluetooth_server
by Mika Lindqvist
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26196 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed race conditions when a ServerApp or ServerWindow is created. The
reply to the client that the object has been created successfully was
sent in the thread creating it. Preempted at the wrong time (right after
writing the message to the port) could lead to the object's thread using
the link at the same time, which would screw up all subsequent
communication via that link.
This fixes the problem that mimeset would sometimes fail when building
Haiku in Haiku (can't find the ticket). It probably also fixes#2331,
and the bug that sometimes when a window is opened (Terminal, crash
alert, shutdown window, etc.) it would come up with huge width/height
and tiny other dimension (can't find the ticket).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26192 a95241bf-73f2-0310-859d-f6bbb57e9c96