* Removed unused SMP_MSG_RESCHEDULE ICI message.
* Introduced flag "invoke_scheduler" in the per CPU structure. It is evaluated in hardware_interrupt() (x86 only ATM). * Introduced SMP_MSG_RESCHEDULE_IF_IDLE message, which enters the scheduler when the CPU currently runs an idle thread. * Don't do dprintf() "CPU x halted!" when handling a SMP_MSG_CPU_HALT ICI message. It uses nested spinlocks and could thus potentially deadlock itself (acquire_spinlock() processes ICI messages, so it could already hold one of the locks). This is a pretty likely scenario on machines with more than two CPUs, but is also possible when the panic()ing thread holds the threads spinlock. Probably fixes #2572. * Reworked the way the kernel debugger is entered and added a "cpu" command that allows switching the CPU once in KDL. It is thus possible to get a stack trace of the thread not on the panic()ing CPU. * When a thread is added to the run queue, we do now check, if another CPU is idle and ask it to reschedule, if it is. Before this change, the CPU was continuing to idle until the quantum of the idle thread expired. Speeds up the libbe.so build about 8% on my machine (haven't tested the full Haiku image build yet). * When spinlock debugging is enabled (DEBUG_SPINLOCKS) we also record the spinlock acquirer on non-smp machines. Added "spinlock" debugger command to get the info. * Added debugger commands "ici" and "ici_message", printing info on pending ICI message respectively on a given one. * Process not only a single ICI message in acquire_spinlock() and other places, but all pending ones. * Also process ICI messages when waiting for a free one -- avoids a potential deadlock. * Mask out non-existing CPUs in send_multicast_ici(). panic() instead of just returning when there's no target CPU left. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28223 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -35,6 +35,7 @@ typedef struct cpu_ent {
|
||||
bigtime_t last_kernel_time;
|
||||
bigtime_t last_user_time;
|
||||
|
||||
bool invoke_scheduler;
|
||||
bool disabled;
|
||||
|
||||
// arch-specific stuff
|
||||
|
||||
@@ -108,6 +108,7 @@ extern void debug_stop_screen_debug_output(void);
|
||||
extern void debug_set_page_fault_info(addr_t faultAddress, addr_t pc,
|
||||
uint32 flags);
|
||||
extern debug_page_fault_info* debug_get_page_fault_info();
|
||||
extern void debug_trap_cpu_in_kdl(bool returnIfHandedOver);
|
||||
|
||||
extern void kputs(const char *string);
|
||||
extern void kputs_unfiltered(const char *string);
|
||||
|
||||
@@ -20,9 +20,9 @@ enum {
|
||||
SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
SMP_MSG_USER_INVALIDATE_PAGES,
|
||||
SMP_MSG_GLOBAL_INVALIDATE_PAGES,
|
||||
SMP_MSG_RESCHEDULE,
|
||||
SMP_MSG_CPU_HALT,
|
||||
SMP_MSG_CALL_FUNCTION,
|
||||
SMP_MSG_RESCHEDULE_IF_IDLE
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
Reference in New Issue
Block a user