Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758044AbXJCK4U (ORCPT ); Wed, 3 Oct 2007 06:56:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754039AbXJCK4M (ORCPT ); Wed, 3 Oct 2007 06:56:12 -0400 Received: from wa-out-1112.google.com ([209.85.146.176]:62734 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753859AbXJCK4L (ORCPT ); Wed, 3 Oct 2007 06:56:11 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=HAxX8nrzVrLRvLw1ce0cDS7O3ZsxdWzseUOJHtWAz+kUu58fsyCrtRQ9HNf2UTD54lgT5SffsO19kSpBVD1nYZMDUxZIpyDeycyksHf2gPwZpSbhZZOTfvE+T8dB+httwDP56IcQPd12Wob5nzsROsWahal93Thj6rJacltoI/c= Message-ID: Date: Wed, 3 Oct 2007 12:55:34 +0200 From: "Dmitry Adamushko" To: "Jarek Poplawski" Subject: Re: Network slowdown due to CFS Cc: "Ingo Molnar" , "David Schwartz" , linux-kernel@vger.kernel.org In-Reply-To: <20071003095057.GD1726@ff.dom.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_25130_23481127.1191408934328" References: <20071002060607.GA18588@elte.hu> <20071003080224.GB1726@ff.dom.local> <20071003081613.GA29904@elte.hu> <20071003085636.GC1726@ff.dom.local> <20071003091058.GB7802@elte.hu> <20071003095057.GD1726@ff.dom.local> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4012 Lines: 99 ------=_Part_25130_23481127.1191408934328 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 03/10/2007, Jarek Poplawski wrote: > I can't see anything about clearing. I think, this was about charging, > which should change the key enough, to move a task to, maybe, a better > place in a que (tree) than with current ways. just a quick patch, not tested and I've not evaluated all possible implications yet. But someone might give it a try with his/(her -- are even more welcomed :-) favourite sched_yield() load. (and white space damaged) --- sched_fair-old.c 2007-10-03 12:45:17.010306000 +0200 +++ sched_fair.c 2007-10-03 12:44:46.899851000 +0200 @@ -803,7 +803,35 @@ static void yield_task_fair(struct rq *r update_curr(cfs_rq); return; + } else if (sysctl_sched_compat_yield == 2) { + unsigned long ideal_runtime, delta_exec, + delta_exec_weighted; + + __update_rq_clock(rq); + /* + * Update run-time statistics of the 'current'. + */ + update_curr(cfs_rq); + + /* + * Emulate (speed up) the effect of us being preempted + * by scheduler_tick(). + */ + ideal_runtime = sched_slice(cfs_rq, curr); + delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; + + if (ideal_runtime > delta_exec) { + delta_exec_weighted = ideal_runtime - delta_exec; + + if (unlikely(curr->load.weight != NICE_0_LOAD)) { + delta_exec_weighted = calc_delta_fair(delta_exec_weighted, + &se->load); + } + se->vruntime += delta_exec_weighted; + } + return; } + /* * Find the rightmost entry in the rbtree: */ > > Jarek P. > -- Best regards, Dmitry Adamushko ------=_Part_25130_23481127.1191408934328 Content-Type: text/x-patch; name="yield.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="yield.patch"; filename="yield.patch"; filename="yield.patch"; filename="yield.patch" X-Attachment-Id: f_f7bpyt4u LS0tIHNjaGVkX2ZhaXItb2xkLmMJMjAwNy0xMC0wMyAxMjo0NToxNy4wMTAzMDYwMDAgKzAyMDAK KysrIHNjaGVkX2ZhaXIuYwkyMDA3LTEwLTAzIDEyOjQ0OjQ2Ljg5OTg1MTAwMCArMDIwMApAQCAt ODAzLDcgKzgwMywzNSBAQCBzdGF0aWMgdm9pZCB5aWVsZF90YXNrX2ZhaXIoc3RydWN0IHJxICpy CiAJCXVwZGF0ZV9jdXJyKGNmc19ycSk7CiAKIAkJcmV0dXJuOworCX0gZWxzZSBpZiAoc3lzY3Rs X3NjaGVkX2Nvb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from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/