qcacmn: Wait for scheduler buffers before we panic
The scheduler can run out of buffers and we panic whenever this happens. However in the older code we wait until the failure count of getting scheduler buffers reaches a defined limit, thus making buffers available in due time and the panic was seen in rare cases, where failure count was exceeding the defined limit. With the qdf_flex_mem supprt added for scheduler, the wait to panic, when the failure count was removed and we panic when the first failure to get scheduler buffer is reached. This change adds to wait until the failure count reaches the limit and then panic. Change-Id: Ie8774830dc0cefdfccb1473216a9300609ab65bb CRs-Fixed: 2322049
This commit is contained in:
@@ -116,6 +116,7 @@ static void scheduler_mq_deinit(struct scheduler_mq_type *msg_q)
|
||||
}
|
||||
|
||||
static qdf_atomic_t __sched_queue_depth;
|
||||
static qdf_atomic_t __sched_dup_fail_count;
|
||||
|
||||
static QDF_STATUS scheduler_all_queues_init(struct scheduler_ctx *sched_ctx)
|
||||
{
|
||||
@@ -247,10 +248,15 @@ struct scheduler_msg *scheduler_core_msg_dup(struct scheduler_msg *msg)
|
||||
|
||||
qdf_mem_copy(dup, msg, sizeof(*dup));
|
||||
|
||||
qdf_atomic_set(&__sched_dup_fail_count, 0);
|
||||
|
||||
return dup;
|
||||
|
||||
buffer_full:
|
||||
QDF_DEBUG_PANIC("Scheduler buffer is full");
|
||||
if (qdf_atomic_inc_return(&__sched_dup_fail_count) >
|
||||
SCHEDULER_WRAPPER_MAX_FAIL_COUNT)
|
||||
QDF_DEBUG_PANIC("Scheduler buffer is full");
|
||||
|
||||
|
||||
dec_queue_count:
|
||||
qdf_atomic_dec(&__sched_queue_depth);
|
||||
|
Reference in New Issue
Block a user