From patchwork Fri Jul 18 21:27:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 33912 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB980208CF for ; Fri, 18 Jul 2014 21:28:50 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at20sf37859044iec.3 for ; Fri, 18 Jul 2014 14:28:50 -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=38IxfQoj4IZPvs1QGU0rmJuKE1kcgQ2SFt/x9qttiKQ=; b=OW2u9OaR5Kjg5dSn4Q4D/eTeSaJ5V7qIMgEP9Dr5q6TyTrZWYlP16fD+aBB/VTjbGE k6g9uPSF6WAGL+J70Y8qDs9wcZ+hZj1YTmZdG47cMIWMZxatztNZUJlZ+JlNUDxQNm/J rdTIifHRU+7sVu+90xJaqySgQ198f3Dm+qoydBa8ogzCi3w1KWcTNhf1rzdT+BW7OAl1 ZaHY/DlUDQy17RrHD/+uSE1SoLGPfOSZDJ8ko2woyauhEtG9Q6QzbNrI6VvD8Of9p828 PnF6cyPPibQH8vFIpmDNYBhpWCf5FZ4UAELCKeZBuDgTXe3aNMlBubAt1Ayh/QaYyAu5 axFg== X-Gm-Message-State: ALoCoQkyI3DR6uDhvI/X0JDCpiPk+lNt+64iri57gbsF8X5STLCyfr8Nu45JVJ5HX62Vq22eDWs/ X-Received: by 10.42.47.10 with SMTP id m10mr3885818icf.34.1405718930340; Fri, 18 Jul 2014 14:28:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.109.36 with SMTP id k33ls1151390qgf.79.gmail; Fri, 18 Jul 2014 14:28:50 -0700 (PDT) X-Received: by 10.220.114.140 with SMTP id e12mr9561822vcq.37.1405718930178; Fri, 18 Jul 2014 14:28:50 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id cz8si6943673vcb.88.2014.07.18.14.28.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 14:28:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so8461057vcb.15 for ; Fri, 18 Jul 2014 14:28:50 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr8305339vdc.8.1405718930079; Fri, 18 Jul 2014 14:28:50 -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 tc5csp42351vcb; Fri, 18 Jul 2014 14:28:49 -0700 (PDT) X-Received: by 10.68.136.226 with SMTP id qd2mr8470974pbb.72.1405718929249; Fri, 18 Jul 2014 14:28:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id km8si7214379pbc.28.2014.07.18.14.28.48; Fri, 18 Jul 2014 14:28:48 -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 S1946095AbaGRV2O (ORCPT + 23 others); Fri, 18 Jul 2014 17:28:14 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:38118 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935157AbaGRV2K (ORCPT ); Fri, 18 Jul 2014 17:28:10 -0400 Received: by mail-ig0-f179.google.com with SMTP id h18so1078239igc.0 for ; Fri, 18 Jul 2014 14:28:10 -0700 (PDT) X-Received: by 10.42.90.74 with SMTP id j10mr11003233icm.29.1405718890161; Fri, 18 Jul 2014 14:28:10 -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 vk3sm9535840igb.17.2014.07.18.14.28.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Jul 2014 14:28:09 -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 v4 1/7] printk: report dropped messages on separate line Date: Fri, 18 Jul 2014 16:27:59 -0500 Message-Id: <1405718885-11227-2-git-send-email-elder@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405718885-11227-1-git-send-email-elder@linaro.org> References: <1405718885-11227-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.170 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 Mladek --- 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;