Changeset 088acbb0 in rtems


Ignore:
Timestamp:
03/07/17 12:07:02 (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
36338fb
Parents:
a11e1ff5
git-author:
Sebastian Huber <sebastian.huber@…> (03/07/17 12:07:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/07/17 12:21:00)
Message:

score: Fix scheduler yield in SMP configurations

Check that no ask help request is registered during unblock and yield
scheduler operations. There is no need to ask for help if a scheduled
thread yields, since this is already covered by the pre-emption
detection.

Update #2556.

Location:
cpukit/score
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/Makefile.am

    ra11e1ff5 r088acbb0  
    162162libscore_a_SOURCES += src/schedulerdefaultgetaffinity.c
    163163libscore_a_SOURCES += src/schedulerdefaultsetaffinity.c
     164libscore_a_SOURCES += src/schedulersmp.c
    164165libscore_a_SOURCES += src/schedulersmpstartidle.c
    165166endif
  • cpukit/score/include/rtems/score/schedulerimpl.h

    ra11e1ff5 r088acbb0  
    1111 *  Copyright (C) 2010 Gedare Bloom.
    1212 *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
    13  *  Copyright (c) 2014, 2016 embedded brains GmbH
     13 *  Copyright (c) 2014, 2017 embedded brains GmbH
    1414 *
    1515 *  The license and distribution terms for this file may be
     
    115115
    116116#if defined(RTEMS_SMP)
    117 /**
    118  * @brief Registers an ask for help request.
     117void _Scheduler_Request_ask_for_help( Thread_Control *the_thread );
     118
     119/**
     120 * @brief Registers an ask for help request if necessary.
    119121 *
    120122 * The actual ask for help operation is carried out during
     
    131133
    132134  if ( the_thread->Scheduler.helping_nodes > 0 ) {
    133     ISR_lock_Context  lock_context;
    134     Per_CPU_Control  *cpu;
    135 
    136     _Thread_Scheduler_acquire_critical( the_thread, &lock_context );
    137     cpu = _Thread_Get_CPU( the_thread );
    138     _Per_CPU_Acquire( cpu );
    139 
    140     _Chain_Append_unprotected(
    141       &cpu->Threads_in_need_for_help,
    142       &the_thread->Scheduler.Help_node
    143     );
    144 
    145     _Per_CPU_Release( cpu );
    146     _Thread_Scheduler_release_critical( the_thread, &lock_context );
    147 
    148     _Thread_Dispatch_request( _Per_CPU_Get(), cpu );
     135    _Scheduler_Request_ask_for_help( the_thread );
    149136  }
    150137}
  • cpukit/score/include/rtems/score/schedulersmpimpl.h

    ra11e1ff5 r088acbb0  
    10861086  if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) {
    10871087    _Scheduler_SMP_Extract_from_scheduled( node );
    1088 
    1089     needs_help = ( *enqueue_scheduled_fifo )( context, node );
     1088    ( *enqueue_scheduled_fifo )( context, node );
     1089    needs_help = false;
    10901090  } else if ( node_state == SCHEDULER_SMP_NODE_READY ) {
    10911091    ( *extract_from_ready )( context, node );
Note: See TracChangeset for help on using the changeset viewer.