IORequest::Wait(). Wait() immediately returned when IsFinished() returned
true, but this is the case as soon as the last IOOperation has finished. The
I/O scheduler is not done with the request at this point, though, since it
will still be sitting in at least one of three doubly linked lists. Since the
usual procedure to issue synchronous I/O requests is to create an IORequest
on the stack, pass it to the I/O scheduler, and Wait() on it, Wait()
returning early might cause the IORequest object to be destroyed while it is
still in use, leading to invalid memory access in the I/O scheduler,
corruption of its list structures, as well as later corruption of the issuing
thread's stack.
Related tickets:
* #4431: The request issuing thread returned and already deleted the area the
request was writing to before NotifyFinished() was called.
* #3048, #4883: Caused by the on stack IORequest being overwritten with other
data while being handled by the I/O scheduler thread.
* #4517: Hard to say, but I've seen a such a problem too, after a thread
scheduling related change. An explanation would be a list structure
corruption in the I/O scheduler causing an infinite loop with disabled
interrupts.
* #2845, #3428, #3429: The block notifier/writer is I/O heavy and as such
quite likely to run into the stack corruption issue.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34655 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Don't watch for moved entries
* Ask the network stack to delete the named interface
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34648 a95241bf-73f2-0310-859d-f6bbb57e9c96
* monitors /dev/net for added or removed devices and handles events
by configuring or unconfiguring interfaces. When plugged a usb
network device, it now appears correcly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34642 a95241bf-73f2-0310-859d-f6bbb57e9c96
AbstractWaitObjectsPage and templatized it over model, wait object group,
and wait object type.
* Replaced the previous MainWindow::WaitObjectPage implementation using
AbstractWaitObjectsPage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34640 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Moved the CPU selection conde into a separate function.
* Re-added the support for disabling CPUs, which I accidentally removed.
* Got rid of idle CPU tracking. We don't need it anymore -- we iterate
through all CPUs and check the priority of the running thread.
* Added a kind of round-robin component to the CPU selection loop, so that
we pick CPUs more evenly. And indeed, the ProcessController display is
less skewed, now. There doesn't seem to be a measurable performance gain,
though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34637 a95241bf-73f2-0310-859d-f6bbb57e9c96
* simple_smp scheduler: Rewrote the interesting part of
enqueue_in_run_queue(). It always selects a target CPU for the inserted
thread, now. If no CPU is idle, the CPU running the thread with the lowest
priority is chosen. If the thread running on the target CPU has a lower
priority than the inserted one, it will be asked to reschedule. If that's
the current CPU, we'll return the correct value (wasn't done before at
all).
These changes help reducing latencies. On my machine in an idle system
playing music DebugAnalyzer shows maximum latencies of about 1 us. I still
find that a bit much, but it's several orders of magnitude better than
before. The -j8 Haiku image build time dropped about 10%.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34635 a95241bf-73f2-0310-859d-f6bbb57e9c96
returning B_INVOKE_SCHEDULER from the interrupt handler, causing
latencies up to a full quantum for the multi audio output thread. This
change improves audio clicks quite a bit on my machine. Though they still
happen from time to time and particulary on FS activity.
* Automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34633 a95241bf-73f2-0310-859d-f6bbb57e9c96
setting the input frequency, but I'm too lazy and not interested in the feature
to actually implement it.
For some reason the setting is not persistent. But the other parameters don't
seem to be persistent either, so this is apparently a general problem.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34630 a95241bf-73f2-0310-859d-f6bbb57e9c96
FreeBSD 8 (r199625) and thus adding the FreeBSD license header.
* Implementing the glue code to make the wavelanwifi driver linking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34626 a95241bf-73f2-0310-859d-f6bbb57e9c96
Both are compiling, but not linking yet. Only for compilation of pci support
has been taken care of, as neither ISA nor PCMCIA are usable within Haiku
anyway.
* Enhancing the FreeBSD compat layer so that the above drivers are compiling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34621 a95241bf-73f2-0310-859d-f6bbb57e9c96
The internal_intr structure needed to be adapted accordingly, otherwise it
would not compile anymore.
This definition is needed by the aironet (if_an.c) driver I'm currently
porting.
* Extending FreeBSD compat layer a bit in preparation of porting the remaining
wlan drivers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34620 a95241bf-73f2-0310-859d-f6bbb57e9c96
I'm afraid there is nothing left of stippi's earlier solution. This fixes
bug #5097.
* The alignment as specified in the BToolTip is now respected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34616 a95241bf-73f2-0310-859d-f6bbb57e9c96
implemented by means of an additional member in cpu_ent.
* Removed thread::keep_scheduled and the related functions. The feature
wasn't used yet and wouldn't have worked as implemented anyway.
* Resurrected an older, SMP aware version of our simple scheduler and made it
the default instead of the affine scheduler. The latter is in no state to
be used yet. It causes enormous latencies (I've seen up to 0.1s) even when
six or seven CPUs were idle at the same time, totally killing parallelism.
That's also the reason why a -j8 build was slower than a -j2. This is no
longer the case. On my machine the -j2 build takes about 10% less time now
and the -j8 build saves another 20%. The latter is not particularly
impressive (compared with Linux), but that seems to be due to lock
contention.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34615 a95241bf-73f2-0310-859d-f6bbb57e9c96
timer_interrupt() return B_INVOKE_SCHEDULER. The scheduler itself uses a
timer hook and relies on scheduler_reschedule() to be called. Will make this
even more reliable in the next commit.
This might fix#3535.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34614 a95241bf-73f2-0310-859d-f6bbb57e9c96
not at all.
* Tried to improve the readability of the "ints" command output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34613 a95241bf-73f2-0310-859d-f6bbb57e9c96
header. This shall ensure uniqueness of the ioctls.
* Added a special SIOCEND define to Haiku's sockio.h, so that drivers can define
private ioctls as can be seen in src/add-ons/kernel/drivers/network/wlan/atheros/dev/ath/if_athioctl.h.
* Modified ioccom.h of the FreeBSD compat layer, to make use of the special
SIOCEND define.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34612 a95241bf-73f2-0310-859d-f6bbb57e9c96
unlocked, allowing for more parallel access.
* Writing is still done synchronously, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34611 a95241bf-73f2-0310-859d-f6bbb57e9c96