From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751355AbWC3SXJ (ORCPT ); Thu, 30 Mar 2006 13:23:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751356AbWC3SXI (ORCPT ); Thu, 30 Mar 2006 13:23:08 -0500 Received: from mail.gmx.de ([213.165.64.20]:37262 "HELO mail.gmx.net") by vger.kernel.org with SMTP id S1751355AbWC3SXH (ORCPT ); Thu, 30 Mar 2006 13:23:07 -0500 X-Authenticated: #14349625 Subject: Re: [rfc][patch] improved interactive starvation patch against 2.6.16 From: Mike Galbraith To: Willy Tarreau Cc: lkml , Ingo Molnar , Andrew Morton , Peter Williams , Nick Piggin , Con Kolivas In-Reply-To: <1143728558.7840.11.camel@homer> References: <1143713997.9381.28.camel@homer> <20060330115540.GA4914@w.ods.org> <1143728558.7840.11.camel@homer> Content-Type: text/plain Date: Thu, 30 Mar 2006 20:23:24 +0200 Message-Id: <1143743004.7532.33.camel@homer> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2006-03-30 at 16:22 +0200, Mike Galbraith wrote: > + if (expired_starving(rq)) { > + int limit = MIN_TIMESLICE + CURRENT_BONUS(p); > + int runtime = now - p->timestamp; > + > + runtime = NS_TO_JIFFIES(runtime); > + if (runtime >= limit && p->time_slice >= limit) { > + > + dequeue_task(p, rq->active); > + enqueue_task(p, rq->expired); > + set_tsk_need_resched(p); > + if (p->prio < rq->best_expired_prio) > + rq->best_expired_prio = p->prio; > + } > + } This bit isn't cutting it. expired_starving() is routine enough that short slicing (on this scale at least) is noticed. Don't waste your time with this one. -Mike