From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867AbcGSKpg (ORCPT ); Tue, 19 Jul 2016 06:45:36 -0400 Received: from ms01.sssup.it ([193.205.80.99]:46433 "EHLO sssup.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbcGSKpc (ORCPT ); Tue, 19 Jul 2016 06:45:32 -0400 X-Greylist: delayed 3602 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Jul 2016 06:45:32 EDT From: Tommaso Cucinotta To: Luca Abeni , Juri Lelli , Peter Zijlstra , Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-dl@retis.sssup.it, Tommaso Cucinotta Subject: SCHED_DEADLINE cpudeadline.{h,c} fixup Date: Tue, 19 Jul 2016 11:44:49 +0200 Message-Id: <1468921493-10054-1-git-send-email-tommaso.cucinotta@sssup.it> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this is a rework of the cpudeadline bugfix and speed-up patch-set, that integrates all comments received so far from Luca and Juri. The first patch is a minimally invasive (1-line) fix for the deadline wrap-around bug. This leaves some weirdness in how cpudl_change_key() is called. Therefore, the second patch does a minimum of refactory to make things more explicit and clear. The 3rd patch contains now the actual performance enhancement (avoiding unneeded swaps during heapify operations), which has been measured to achieve up to 10% , of speed-up for cpudl_set() calls. This has been measured with a andomly generated workload of 1K,10K,100K random heap insertions and deletions (75% cpudl_set() calls with is_valid=1 and 25% with is_valid=0), and randomly generated cpu IDs, with up to 256 CPUs. Benchmarking code is available at: https://github.com/tomcucinotta/cpudl-bench Obtained speed-up plot: https://github.com/tomcucinotta/cpudl-bench/blob/master/cpudl.pdf Finally, the 4th patch is another clear-up patch touching cpudeadline.{h,c} and deadline.c. Now you call cpudl_clear(cp, cpu) and cpudl_set(cp, cpu, dl) instead of cpudl_set(cp, cpu, 0 /* dl */, 0 /* is_valid */) and cpudl_set(cp, cpu, dl, 1 /* is_valid */). Please, share your comments, thanks! Tommaso