From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759034AbdEWCDF (ORCPT ); Mon, 22 May 2017 22:03:05 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:45373 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109AbdEWCDC (ORCPT ); Mon, 22 May 2017 22:03:02 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 165.244.249.25 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park To: , CC: , , , , Subject: [PATCH v5 0/4] Make find_later_rq() choose a closer cpu in topology Date: Tue, 23 May 2017 11:00:55 +0900 Message-ID: <1495504859-10960-1-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB06/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/05/23 11:01:14, Serialize by Router on LGEKRMHUB06/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/05/23 11:01:14, Serialize complete at 2017/05/23 11:01:14 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When cpudl_find() returns any among free_cpus, the cpu might not be closer than others, considering sched domain. For example: this_cpu: 15 free_cpus: 0, 1,..., 14 (== later_mask) best_cpu: 0 topology: 0 --+ +--+ 1 --+ | +-- ... --+ 2 --+ | | +--+ | 3 --+ | ... ... 12 --+ | +--+ | 13 --+ | | +-- ... -+ 14 --+ | +--+ 15 --+ In this case, it would be best to select 14 since it's a free cpu and closest to 15(this_cpu). However, currently the code select 0(best_cpu) even though that's just any among free_cpus. Fix it. Change from v4 -. remove a patch that might cause huge lock contention (by spin lock(&cpudl.lock) in a hot path of scheduler) Change from v3 -. rename closest_cpu to best_cpu so that it align with rt -. protect referring cpudl.elements with cpudl.lock -. change return value of cpudl_find() to bool Change from v2 -. add support for SD_PREFER_SIBLING Change from v1 -. clean up the patch Byungchul Park (4): sched/deadline: Make find_later_rq() choose a closer cpu in topology sched/deadline: Change return value of cpudl_find() sched/deadline: Add support for SD_PREFER_SIBLING on find_later_rq() sched/rt: Add support for SD_PREFER_SIBLING on find_lowest_rq() kernel/sched/cpudeadline.c | 26 ++++++++++++------------- kernel/sched/deadline.c | 48 +++++++++++++++++++++++++++++++--------------- kernel/sched/rt.c | 17 ++++++++++++++++ 3 files changed, 63 insertions(+), 28 deletions(-) -- 1.9.1