From patchwork Mon May 29 21:02:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 100686 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp498128qge; Mon, 29 May 2017 14:19:16 -0700 (PDT) X-Received: by 10.99.140.9 with SMTP id m9mr21606690pgd.49.1496092756152; Mon, 29 May 2017 14:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496092756; cv=none; d=google.com; s=arc-20160816; b=JyBnqQw65egw169LcociEHHk7zNvMy48RoPP6oL8EKVmx7yy1lbpEF9uG6gsNps6rT wiqqM4u/J52EGku/Ne8JCtUOoAJ/CdQ6YZYBH/9dLF9mFOlzZhAGtfiAKuiylAk6uHUq U18uQI4zecbdYKrNzAJdnsL3YzEQMuMQCV84Lnms3sTPas2FA8+cvLmuHzpGByPIRtgh MydIzBE26f5yXTMhLEfdAWVVyb6cAxFmkZU1gCPse6cZ0Lt7lwe2MBWgevccArUM7Gja QNDzCka3FCwj6d/U2Krit/HYEoMGMHDKMpTJbhj8fy3bYR3HX/GcA5PQc3SXxnIPDhYl 5xdA== 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=wEW5a5QGHKcuk/8CZdfEG/xUfrtWoTndvVnHbHnbVzc=; b=Jk2yme+Yk1R1N4QoaA1WfD2oD17WEzgCE28qrraPIj9jxfm5ue4+SNgT2aMDLEnDHa vP/y+r4QvhPl6N4qJQvVfSDiGH86EEBU+MueU/lsMoogA7eeFmAWCHUxJ6gAXBW2NiEJ b6OjPg3NqkEkme2T373MlerIka1DoU/H59ut1W0mxEo7VizkfHK2T3t+fs5ZjH/bIYlq NI/aB9Wu5Bf9K8giDw96rdXw2+1tbe3X7CyOcXYOFFt2Au2STlNSyXHaEq1cT4JtwkFg OzSunM3Dp1i/3fN0g/uMClo9jVocVDxQxmE4xYKk4iwBztxTdtt7/fYVKNcYqNohk+Cv d+eQ== 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 x5si11465257pfx.75.2017.05.29.14.19.15; Mon, 29 May 2017 14:19:16 -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 S1751362AbdE2VSw (ORCPT + 25 others); Mon, 29 May 2017 17:18:52 -0400 Received: from alt22.smtp-out.videotron.ca ([70.80.0.73]:28886 "EHLO alt22.smtp-out.videotron.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbdE2VSL (ORCPT ); Mon, 29 May 2017 17:18:11 -0400 Received: from yoda.home ([96.23.157.65]) by Videotron with SMTP id FRohdlqSTzCgpFRoidThXE; Mon, 29 May 2017 17:03:09 -0400 X-Authority-Analysis: v=2.1 cv=QfzGxpvv 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=tJ8p9aeEuA8A:10 a=KD78AxLimrIMB15zPRcA:9 Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 75A972DA04F8; Mon, 29 May 2017 17:03:07 -0400 (EDT) From: Nicolas Pitre To: Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org Subject: [PATCH 0/7] scheduler tinification Date: Mon, 29 May 2017 17:02:55 -0400 Message-Id: <20170529210302.26868-1-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.9.4 X-CMAE-Envelope: MS4wfKhEzEIu+GVD8EnCoyjHQFKrrn37KHu561Je/qdNW2dd4jnaHVLhVtM19iO9DwEls2wgs4u6DNUUR59IDQdaZoNIoPoYLJmAjnZmn8owQVT5wTMv4EWN YDtXsSAVnYfKvqm/b8cFyiinouzndYttQEGkoMsurbySQedE1Yid/FG1YV7LCo03TETJmh6kUSGfanUZVrh9CuLZ4DzsEk3mrVo2agltDM0SckP2J3z52IHN 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 And for the record, my Fedora workstation still boots and apparently runs fine with those patches activated. I didn't test it at length though. A significant part of the remaining code is support for various system calls that could be automatically removed when user space doesn't use them but that is a topic for another day. diffstat for this series: include/linux/init_task.h | 15 +- include/linux/rtmutex.h | 69 ++++ include/linux/sched.h | 4 + include/linux/sched/deadline.h | 2 +- include/linux/sched/rt.h | 4 +- init/Kconfig | 23 +- kernel/locking/Makefile | 2 + kernel/locking/rtmutex.c | 9 + kernel/sched/Makefile | 7 +- kernel/sched/core.c | 777 +++++------------------------------ kernel/sched/deadline.c | 336 +++++++++++++++ kernel/sched/debug.c | 6 + kernel/sched/rt.c | 320 ++++++++++++++- kernel/sched/sched.h | 35 +- kernel/sched/stop_task.c | 6 + kernel/sched/topology.c | 6 + kernel/sysctl.c | 4 +- kernel/time/posix-cpu-timers.c | 6 +- lib/Kconfig.debug | 2 +- 19 files changed, 930 insertions(+), 703 deletions(-)