From patchwork Fri Jul 18 14:14:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 33865 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A97BD20CA0 for ; Fri, 18 Jul 2014 14:15:11 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id ft15sf25337111pdb.10 for ; Fri, 18 Jul 2014 07:15: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:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=Nz2V5ROSO1EUzxIisgcuJMYGroD1JsVhZDfvFJulNCM=; b=lCZGh50I+P6Zh6KpCDzB8AJks/kbwi76/yfsbngiaTgVR1N65vdCYEujYwFut+DFKT 6p5qVsLprZ2jkOIbr+edUNUtGy3xWn8WWgJtb9eqwV1lhHzLypp3ZREo70uuAz2sMlqt oYK4SiqDtOgszqCuJejKkXv0QNQjjhhaIaG/aeCACkJMhYpgCcifdzjKo5rbhIqJRgBf 4X24yBdwb1O0ow11zwVh9y9uulrQcDrKvdr81DS3d+jM0UG/xxmx+9LNBFfEZekEjxGD ZFSql4BhaS6Lh9gtL6kjaUBpQ0kjMUBkt64x3KmyNQxWZ6jPKUUt+Wl+Dz6x+Tw0pQc1 fXRA== X-Gm-Message-State: ALoCoQkE/SanNSPzzVZ0SxK5axqyncWMBk439NqlaL5914IkCc0CZLaZwZsWQr4jqsF6B0sVrVGS X-Received: by 10.66.160.164 with SMTP id xl4mr2524125pab.48.1405692910558; Fri, 18 Jul 2014 07:15:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.203 with SMTP id h69ls1001239qgh.56.gmail; Fri, 18 Jul 2014 07:15:10 -0700 (PDT) X-Received: by 10.52.101.168 with SMTP id fh8mr5336190vdb.34.1405692910450; Fri, 18 Jul 2014 07:15:10 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id rw10si5817605vcb.44.2014.07.18.07.14.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 07:14:46 -0700 (PDT) Received-SPF: temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id la4so7390448vcb.23 for ; Fri, 18 Jul 2014 07:14:46 -0700 (PDT) X-Received: by 10.52.120.38 with SMTP id kz6mr5184876vdb.86.1405692886314; Fri, 18 Jul 2014 07:14:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp14717vcb; Fri, 18 Jul 2014 07:14:43 -0700 (PDT) X-Received: by 10.66.164.234 with SMTP id yt10mr5411267pab.65.1405692882364; Fri, 18 Jul 2014 07:14:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3si6089123pbw.183.2014.07.18.07.14.40; Fri, 18 Jul 2014 07:14:40 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935130AbaGROOX (ORCPT + 25 others); Fri, 18 Jul 2014 10:14:23 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:50325 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935096AbaGROOU (ORCPT ); Fri, 18 Jul 2014 10:14:20 -0400 Received: by mail-ig0-f181.google.com with SMTP id h3so639719igd.8 for ; Fri, 18 Jul 2014 07:14:19 -0700 (PDT) X-Received: by 10.50.23.16 with SMTP id i16mr39586789igf.24.1405692859763; Fri, 18 Jul 2014 07:14:19 -0700 (PDT) Received: from localhost.localdomain (c-24-245-18-91.hsd1.mn.comcast.net. [24.245.18.91]) by mx.google.com with ESMTPSA id ga11sm6234171igd.8.2014.07.18.07.14.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Jul 2014 07:14:19 -0700 (PDT) From: Alex Elder To: akpm@linux-foundation.org Cc: kay@vrfy.org, pmladek@suse.cz, bp@suse.de, john.stultz@linaro.org, jack@suse.cz, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/7] printk: report dropped messages on separate line Date: Fri, 18 Jul 2014 09:14:13 -0500 Message-Id: <1405692859-32500-2-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405692859-32500-1-git-send-email-elder@linaro.org> References: <1405692859-32500-1-git-send-email-elder@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: elder@linaro.org X-Original-Authentication-Results: mx.google.com; spf=temperror (google.com: error in processing during lookup of patch+caf_=patchwork-forward=linaro.org@linaro.org: DNS timeout) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It is possible for the log to be filled too quickly for the consoles to be able to keep up. This is detected in console_unlock(), and when it occurs, a message is printed on the console. When reviewing some nearby code, Petr Mládek suggested it might be nicer if this message were placed on a separate line. This patch implements that suggestion. Suggested-by: Petr Mládek Signed-off-by: Alex Elder --- kernel/printk/printk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 13e839d..bed8f09 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2142,9 +2142,10 @@ again: } if (console_seq < log_first_seq) { - len = sprintf(text, "** %u printk messages dropped ** ", + len = sprintf(text, + "%s** %llu printk messages dropped **\n", + (console_prev & LOG_CONT) ? "\n" : "", (unsigned)(log_first_seq - console_seq)); - /* messages are gone, move to first one */ console_seq = log_first_seq; console_idx = log_first_idx;