From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969483AbdEZAQi (ORCPT ); Thu, 25 May 2017 20:16:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:34412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760966AbdEZAQe (ORCPT ); Thu, 25 May 2017 20:16:34 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C98B239EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mcgrof@kernel.org From: "Luis R. Rodriguez" To: akpm@linux-foundation.org, jeyu@redhat.com, shuah@kernel.org, rusty@rustcorp.com.au, ebiederm@xmission.com, dmitry.torokhov@gmail.com, acme@redhat.com, corbet@lwn.net Cc: martin.wilck@suse.com, mmarek@suse.com, pmladek@suse.com, hare@suse.com, rwright@hpe.com, jeffm@suse.com, DSterba@suse.com, fdmanana@suse.com, neilb@suse.com, linux@roeck-us.net, rgoldwyn@suse.com, subashab@codeaurora.org, xypron.glpk@gmx.de, keescook@chromium.org, atomlin@redhat.com, mbenes@suse.cz, paulmck@linux.vnet.ibm.com, dan.j.williams@intel.com, jpoimboe@redhat.com, davem@davemloft.net, mingo@redhat.com, alan@linux.intel.com, tytso@mit.edu, gregkh@linuxfoundation.org, torvalds@linux-foundation.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Luis R. Rodriguez" Subject: [PATCH v2 0/5] kmod: help make deterministic Date: Thu, 25 May 2017 17:16:25 -0700 Message-Id: <20170526001630.19203-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170519032444.18416-1-mcgrof@kernel.org> References: <20170519032444.18416-1-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On this v2 I'm following Dmitry Torokhov's recommendation from the v1 series [0] and I stop dancing around with work arounds and try to go straight for what I think should be a proper fix for kmod: throttle instead of failing when kmod max concurrent threshold is reached. This patch series depends on the unsigned int range proc sysctl changes which Andrew Morton recently merged into his -mm tree [1]. The kmod stress test driver uses a new license (GPL on Linux, copyleft-next outside of Linux). Linus was fine with the copyleft-next so long as it was clear GPL applies to Linux [2] and an or clause was used if I wanted to use copyleft-next. Later based on discussions with Alan and Ted ironed out an "or" language clause to use [3]. All code is also available on my 20170525-kmod-throttle branch of my linux-next tree based on tag next-20170525 [4]. If there are any questions please let me know. [0] https://lkml.kernel.org/r/20170519032444.18416-1-mcgrof@kernel.org [1] https://lkml.kernel.org/r/20170519033554.18592-1-mcgrof@kernel.org [2] https://lkml.kernel.org/r/CA+55aFyhxcvD+q7tp+-yrSFDKfR0mOHgyEAe=f_94aKLsOu0Og@mail.gmail.com [3] https://lkml.kernel.org/r/1495234558.7848.122.camel@linux.intel.com [4] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20170525-kmod-throttle Luis Luis R. Rodriguez (5): module: use list_for_each_entry_rcu() on find_module_all() kmod: reduce atomic operations on kmod_concurrent kmod: add test driver to stress test the module loader kmod: add helpers for getting kmod limit kmod: throttle kmod thread limit Documentation/sysctl/kernel.txt | 20 + include/linux/kmod.h | 7 + init/main.c | 1 + kernel/kmod.c | 92 ++- kernel/module.c | 2 +- kernel/sysctl.c | 7 + lib/Kconfig.debug | 25 + lib/Makefile | 1 + lib/test_kmod.c | 1246 +++++++++++++++++++++++++++++++++ tools/testing/selftests/kmod/Makefile | 11 + tools/testing/selftests/kmod/config | 7 + tools/testing/selftests/kmod/kmod.sh | 615 ++++++++++++++++ 12 files changed, 2004 insertions(+), 30 deletions(-) create mode 100644 lib/test_kmod.c create mode 100644 tools/testing/selftests/kmod/Makefile create mode 100644 tools/testing/selftests/kmod/config create mode 100755 tools/testing/selftests/kmod/kmod.sh -- 2.11.0