From patchwork Mon Jul 28 13:29:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 34369 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6001F20AE8 for ; Mon, 28 Jul 2014 13:31:30 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id ij19sf22847921vcb.0 for ; Mon, 28 Jul 2014 06:31:30 -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=oIf/44QK8JwsDtjE8s+/07kf6iTMgYbklV4QYOv5A9E=; b=doG20FMyklnVNMTB39ZfiwJKbHBch9NxkkK4MUUzcqwyhjrF0ec94fyawzBBB6p5Kr 4X0JEgvkxdPntFlJWeJeoWjSklw9PCPwGFqDwfYuEFe6DHTF3xioKiRX+WYpzazy4kgH qye7q8cy4nzuM401x+cY6/m9EH5twdvqXJcenqzgBFGsTYItEAF3f0vYfYJv8WJnbZ+n PwZYhiYR5RMvllavlVzV0Ii3fHB/JejTLsRlTDprRAyxw2X8xtAdAZt6bGvy5qOvKHbq XU3LBJtk82rHkWOh4LBD43BhUQ2Fg7GOsyDi/2vZpB0rciX2O04iPJ6fzUSv9To1MdM7 N+kQ== X-Gm-Message-State: ALoCoQkGg8sfj87pLVrGVvLezCUuw/HrebHPcLjpsr8kO6+w8+rhqWvUaxx78LRwXSxlNDjLUwMn X-Received: by 10.52.142.12 with SMTP id rs12mr6038864vdb.8.1406554290141; Mon, 28 Jul 2014 06:31:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.167 with SMTP id h36ls2144959qgd.77.gmail; Mon, 28 Jul 2014 06:31:30 -0700 (PDT) X-Received: by 10.52.64.140 with SMTP id o12mr2300367vds.70.1406554290014; Mon, 28 Jul 2014 06:31:30 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id im6si12415869vec.49.2014.07.28.06.31.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 06:31:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so11158461vcb.33 for ; Mon, 28 Jul 2014 06:31:29 -0700 (PDT) X-Received: by 10.52.37.81 with SMTP id w17mr1172086vdj.95.1406554289933; Mon, 28 Jul 2014 06:31:29 -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 tc5csp166774vcb; Mon, 28 Jul 2014 06:31:29 -0700 (PDT) X-Received: by 10.70.36.7 with SMTP id m7mr38136222pdj.91.1406554288219; Mon, 28 Jul 2014 06:31:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xr5si17865320pbc.47.2014.07.28.06.31.27 for ; Mon, 28 Jul 2014 06:31:28 -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 S1753009AbaG1Nb0 (ORCPT + 26 others); Mon, 28 Jul 2014 09:31:26 -0400 Received: from mail-ie0-f171.google.com ([209.85.223.171]:43042 "EHLO mail-ie0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752164AbaG1N3W (ORCPT ); Mon, 28 Jul 2014 09:29:22 -0400 Received: by mail-ie0-f171.google.com with SMTP id at1so6638234iec.2 for ; Mon, 28 Jul 2014 06:29:20 -0700 (PDT) X-Received: by 10.42.100.6 with SMTP id y6mr43120431icn.28.1406554160853; Mon, 28 Jul 2014 06:29:20 -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 i10sm26832385igm.13.2014.07.28.06.29.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jul 2014 06:29:20 -0700 (PDT) From: Alex Elder To: akpm@linux-foundation.org Cc: kay@vrfy.org, pmladek@suse.cz, john.stultz@linaro.org, jack@suse.cz, linux-kernel@vger.kernel.org Subject: [PATCH v7 1/7] printk: report dropped messages on separate line Date: Mon, 28 Jul 2014 08:29:14 -0500 Message-Id: <1406554160-9562-2-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406554160-9562-1-git-send-email-elder@linaro.org> References: <1406554160-9562-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) 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 inserted to note the event. 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 Reviewed-by: Petr Mládek --- 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..ffc9928 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** %u 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;