From patchwork Wed Apr 23 03:36:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 28843 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B3F1D203AC for ; Wed, 23 Apr 2014 03:37:10 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id wp4sf2330361obc.4 for ; Tue, 22 Apr 2014 20:37:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=TkduE6Jph5r8X2m0jce6D2YfiRZv4vaxC5O6GsEgvM8=; b=b2vBGmhjzvSPmTG2+lOHvkuFyhW4r4absJBMUIHRGoNrCXnLRSwdHIf7t3qCzlZ4S8 CweBNMMZikkUizmW/hrT31zvrQ2WuM7qVBdXPHwv+RWmL3buNrlwlyvGt+JxfxzE1jSQ 94HLalJclYJojFT3GFvmzMZDMBKejRliC+rfEk3HD2KDOJB3Y0VN2fFtG729/kctZbAi Q0Iy32G5Bk89xQgl8k9XMOhLDmGLHAeQ+drn59pbAHmOd8Lz/XAQwrhYtfAOU+GheDw5 RWCX8voSbiHUTXuQYM3xzAU5vXWXewftL2z0cI/X08MtILD8Td/y1eKcMakH5ZVznS8g Zt3A== X-Gm-Message-State: ALoCoQkzJ/DgVaLtf9ZX/7jayAy6/tP7GiTLkVtBrkbZls+PAuChS3u53BIbukTL3exS4MdOqQie X-Received: by 10.42.123.66 with SMTP id q2mr18736961icr.16.1398224230233; Tue, 22 Apr 2014 20:37:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.22 with SMTP id 22ls392204qgi.63.gmail; Tue, 22 Apr 2014 20:37:10 -0700 (PDT) X-Received: by 10.58.202.133 with SMTP id ki5mr38308451vec.19.1398224230075; Tue, 22 Apr 2014 20:37:10 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id tq2si7205669vdc.111.2014.04.22.20.37.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 20:37:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so438001vcb.7 for ; Tue, 22 Apr 2014 20:37:10 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr38593575vcw.15.1398224229994; Tue, 22 Apr 2014 20:37:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp72969vcb; Tue, 22 Apr 2014 20:37:09 -0700 (PDT) X-Received: by 10.68.162.1 with SMTP id xw1mr15138686pbb.128.1398224229227; Tue, 22 Apr 2014 20:37:09 -0700 (PDT) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id gg7si23906729pac.188.2014.04.22.20.37.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 20:37:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.160.43; Received: by mail-pb0-f43.google.com with SMTP id um1so314417pbc.16 for ; Tue, 22 Apr 2014 20:37:08 -0700 (PDT) X-Received: by 10.68.133.163 with SMTP id pd3mr7822654pbb.166.1398224228824; Tue, 22 Apr 2014 20:37:08 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id yx3sm88266665pbb.6.2014.04.22.20.37.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 20:37:07 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , Jan Kara , Peter Zijlstra , Jiri Bohac , Thomas Gleixner , Ingo Molnar , Andrew Morton Subject: [RFC][PATCH 1/3] printk: Rename printk_sched to printk_deferred Date: Tue, 22 Apr 2014 20:36:56 -0700 Message-Id: <1398224218-4429-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398224218-4429-1-git-send-email-john.stultz@linaro.org> References: <1398224218-4429-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , After learning we'll need some sort of deferred printk functionality in the timekeeping core, Peter suggested we rename the printk_sched function so it can be reused by needed subsystems. This only changes the function name and name of the associated buffer. No logic changes. Cc: Jan Kara Cc: Peter Zijlstra Cc: Jiri Bohac Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Signed-off-by: John Stultz --- include/linux/printk.h | 6 +++--- kernel/printk/printk.c | 8 ++++---- kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 2 +- kernel/sched/rt.c | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index 8752f75..7847301 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -128,9 +128,9 @@ asmlinkage __printf(1, 2) __cold int printk(const char *fmt, ...); /* - * Special printk facility for scheduler use only, _DO_NOT_USE_ ! + * Special printk facility for scheduler/timekeeping use only, _DO_NOT_USE_ ! */ -__printf(1, 2) __cold int printk_sched(const char *fmt, ...); +__printf(1, 2) __cold int printk_deferred(const char *fmt, ...); /* * Please don't use printk_ratelimit(), because it shares ratelimiting state @@ -165,7 +165,7 @@ int printk(const char *s, ...) return 0; } static inline __printf(1, 2) __cold -int printk_sched(const char *s, ...) +int printk_deferred(const char *s, ...) { return 0; } diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index a45b509..a9763e4 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2443,14 +2443,14 @@ late_initcall(printk_late_init); #define PRINTK_PENDING_SCHED 0x02 static DEFINE_PER_CPU(int, printk_pending); -static DEFINE_PER_CPU(char [PRINTK_BUF_SIZE], printk_sched_buf); +static DEFINE_PER_CPU(char [PRINTK_BUF_SIZE], printk_deferred_buf); static void wake_up_klogd_work_func(struct irq_work *irq_work) { int pending = __this_cpu_xchg(printk_pending, 0); if (pending & PRINTK_PENDING_SCHED) { - char *buf = __get_cpu_var(printk_sched_buf); + char *buf = __get_cpu_var(printk_deferred_buf); pr_warn("[sched_delayed] %s", buf); } @@ -2473,7 +2473,7 @@ void wake_up_klogd(void) preempt_enable(); } -int printk_sched(const char *fmt, ...) +int printk_deferred(const char *fmt, ...) { unsigned long flags; va_list args; @@ -2481,7 +2481,7 @@ int printk_sched(const char *fmt, ...) int r; local_irq_save(flags); - buf = __get_cpu_var(printk_sched_buf); + buf = __get_cpu_var(printk_deferred_buf); va_start(args, fmt); r = vsnprintf(buf, PRINTK_BUF_SIZE, fmt, args); diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 268a45e..423704c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1320,7 +1320,7 @@ out: * leave kernel. */ if (p->mm && printk_ratelimit()) { - printk_sched("process %d (%s) no longer affine to cpu%d\n", + printk_deferred("process %d (%s) no longer affine to cpu%d\n", task_pid_nr(p), p->comm, cpu); } } diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index b080957..657ed68 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -352,7 +352,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se, if (!lag_once) { lag_once = true; - printk_sched("sched: DL replenish lagged to much\n"); + printk_deferred("sched: DL replenish lagged to much\n"); } dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline; dl_se->runtime = pi_se->dl_runtime; diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index bd2267a..c19b3cc 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -857,7 +857,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq) if (!once) { once = true; - printk_sched("sched: RT throttling activated\n"); + printk_deferred("sched: RT throttling activated\n"); } } else { /*