From patchwork Tue Jun 6 23:24:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 103190 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp1670697qgd; Tue, 6 Jun 2017 16:25:19 -0700 (PDT) X-Received: by 10.84.215.148 with SMTP id l20mr159506pli.79.1496791519063; Tue, 06 Jun 2017 16:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496791519; cv=none; d=google.com; s=arc-20160816; b=VrtOEUInKPbHraS2hOtwR/IvsuTYivXTjKohjEcC/rQupWZgP3jZrNX/QGG9O71v+c mXDMyJRCrz1WgrCb8NwSLiAUlQ5Ney1v3X7GyLkO17gMUwSWzhvavTtL2z5M5WSwiWtw 0iu2VczdOyquCjEy2npI5JXIhcInYUZ20/BR/xJxjOJfSmZExZir9XAfwcSZduwkZNUV tzLG3l2bMLYFfA+hA0JWNWbFXcEdVcL69olAer5uwnVuYdVIgGwC51CbaXzW7bLr3Rqt HbDzStDuAR1PWAY0+zVipPho4I8wMGPkGlM0G6YvDT8olcMutPcSCNQvMI3zo8XmcA1H szZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=L/hj1w0qa4+ONGrNAhbkYnhMr+qFnENk8AgwwyCvvwg=; b=vsmTmXwoNFkBJnAWQiNq4I4cMeekcCZyWUp/eDm5pdgJ2YmGWp7CCqueg6BmIsq3gc hcvpKVvfcMwTlOM7AQ6//bDqGkL2faeDRLgXMC1y43maAFM7Mh6A0x4u1ih4jiJGR5WU 3CoOFv4PaEGr2O7hhSN9wc5LEQs+3acgKXQTlW0zqwtFZvII/Gv6YRHtf7HSoPxlK3P5 L88J/Jctyuk1kyTjwbEe8sLO96VL7QhKDnTmhsI2cgy0d9AgVojGFO5uU2C1mI5PzjgS zQ0cnJj2/0IBrcq9akbeGb3dLad/hgNypDYfc//5nB9ol8WN9qgv8WED5k6Y7IP8VWaE mZ3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w31si2425552pla.343.2017.06.06.16.25.18; Tue, 06 Jun 2017 16:25:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbdFFXZE (ORCPT + 25 others); Tue, 6 Jun 2017 19:25:04 -0400 Received: from alt22.smtp-out.videotron.ca ([70.80.0.73]:38004 "EHLO alt22.smtp-out.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbdFFXZB (ORCPT ); Tue, 6 Jun 2017 19:25:01 -0400 Received: from yoda.home ([96.23.157.65]) by Videotron with SMTP id INqMdHhOnPTiyINqNdLUDf; Tue, 06 Jun 2017 19:25:00 -0400 X-Authority-Analysis: v=2.1 cv=L469O7n8 c=1 sm=1 tr=0 a=keA3yYpnlypCNW5BNWqu+w==:117 a=keA3yYpnlypCNW5BNWqu+w==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=LWSFodeU3zMA:10 a=CS7I1TVWcloalEDArDkA:9 Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id B4C112DA0543; Tue, 6 Jun 2017 19:24:58 -0400 (EDT) From: Nicolas Pitre To: Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 0/8] scheduler tinification Date: Tue, 6 Jun 2017 19:24:42 -0400 Message-Id: <20170606232450.30278-1-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.4 X-CMAE-Envelope: MS4wfKTNF4ojnYRL4lijML58xkU9zp2nAtWauHxa5ts0nduiSL6E9yUxP8bqcp+eUVR+b77KScb/JFXQ1azMqqQ6MJw2TYzKgpkWUwRrL+KW9OAsfqoFUycQ gi6l5Bm/u4iqK/ikcNB1V7hGB/F7BFHACmubbULcyuZtBFvBRg6MlWn1fgBmapfE9HsXfa73MysJ2SHgw0QZTWgjfeiBESi/yr7RA8JIW7CRYmz756wil0OS Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many embedded systems don't need the full scheduler support. Most of the time, user space is tightly controlled and many of the scheduler facilities are simply unused. This patch series makes it possible to configure out some parts of the scheduler such as the deadline and realtime scheduler classes. The saving in kernel footprint is non negligible. Small ARM kernel config before this series: text data bss dec hex filename 28623 3404 128 32155 7d9b kernel/sched/built-in.o With this series and dl and rt classes disabled: text data bss dec hex filename 20734 3334 40 24108 5e2c kernel/sched/built-in.o A significant part of the remaining code is support for various system calls that could be automatically removed when user space doesn't use it but that is a topic for another day. Changes from v1: - the deadline class is configurable independently from the realtime class - split of the PI futex code to make non-PI futexes available when RT is configured out - removal of many #ifdefs to keep the code more readable diffstat for this series: include/linux/futex.h | 7 +- include/linux/init_task.h | 15 +- include/linux/rtmutex.h | 69 + include/linux/sched.h | 4 + include/linux/sched/deadline.h | 8 +- include/linux/sched/rt.h | 10 +- init/Kconfig | 28 +- kernel/futex.c | 2829 ++++++++-------------------------- kernel/futex_pi.c | 1563 +++++++++++++++++++ kernel/locking/Makefile | 3 + kernel/locking/locktorture.c | 4 +- kernel/locking/rtmutex.c | 6 +- kernel/sched/Makefile | 7 +- kernel/sched/core.c | 759 +-------- kernel/sched/cpudeadline.h | 7 +- kernel/sched/deadline.c | 340 ++++ kernel/sched/debug.c | 6 + kernel/sched/rt.c | 315 +++- kernel/sched/sched.h | 88 +- kernel/sched/stop_task.c | 6 + kernel/sysctl.c | 4 +- kernel/time/posix-cpu-timers.c | 7 +- lib/Kconfig.debug | 2 +- 23 files changed, 3190 insertions(+), 2897 deletions(-)