Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4228772imm; Tue, 25 Sep 2018 13:40:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV615Xl9CntUum9B7rbkoI8PP/MGCdFbUqWExvXSaSk5C1w3aenRnz8miVF/zZiURgGMo1JtW X-Received: by 2002:a63:4663:: with SMTP id v35-v6mr2604345pgk.178.1537908030774; Tue, 25 Sep 2018 13:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537908030; cv=none; d=google.com; s=arc-20160816; b=VZKPh5Oa4ULhcC+OVg9vjoUMkduf+L7+NYt+HEUD3W1cX8MmihPV1qNPccznuKL1Yz gvJzEkLFwbFzLcM/+uzBD0djWiRWVBZ4I0vcmyJMTmDOpxIwE0fdhoJRl+8//yUTFksb RN1rBBc1p8B2SiwzMEq6t3vR4cXj6+D0Qbw2E2G5h4TE84DPfBE7FADUOvF3hnvpKB+O PN8OznRmA+OZup2D6q2zaMladWJUrsT+wpVhXRR++Iou9ICtrIXJYwRE4whM1/l43lAm PCcpTSZoobBNw4vMBuvl/Hg79pALtsKIpyjOyg94c0DRNqIaUdBaxhd/z+W9ZT+tts50 fx/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=RDQ3xx80SRyQFwywcrombnQRB2XWBbCFo3YhVjtFhAY=; b=f6QkhF1OdQLItUb/xdFhx3pv3xahxNCYgQ//1X0nWj8ZhP/7o4ZShaJjhNEVUXSRH5 2JB+IT/AvuAzJDDOn0Ke/gFmqGpSejanPDMrc2CGS+tXwcO5Vv3N9komWMusfnemwHEo PTB+DSlFb5sa5RdiMbtmeSBGqAjhAlpKyOLn3clPoPuRs4HSOfXyuHJbbDQc3loUTqbm 4rZNi7+WPGyk4+bvcMYnNSECaPao0BtUI7Gs4CJKI7KSPdgEptXhaQGh7xS40UdxDTGn Du0+N4KfFO0+TksL7P6eqqeU7UUapbh1y+ouZ3CcSasxAtFMI9rSve4qd+utm/fvstLi xVaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WFYzIfRX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si3175477pgm.126.2018.09.25.13.40.15; Tue, 25 Sep 2018 13:40:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WFYzIfRX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbeIZCt1 (ORCPT + 99 others); Tue, 25 Sep 2018 22:49:27 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:45686 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725918AbeIZCt0 (ORCPT ); Tue, 25 Sep 2018 22:49:26 -0400 Received: by mail-qt1-f195.google.com with SMTP id l2-v6so14930242qtr.12 for ; Tue, 25 Sep 2018 13:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RDQ3xx80SRyQFwywcrombnQRB2XWBbCFo3YhVjtFhAY=; b=WFYzIfRXCpIjdM0nNU/APzW3QxHrvqka2SAgCRv/Fb49iaPar+TZzcp+LI2nDW/BjZ mAnkW8kuacoTFaCytqjx1uSqH4b0pi2K2ecRhhxw4Uw1m1ky2DqW0xhhq7PmWvZokFgD bT1cXbHHTmKAv0XpiuOZ2C45LQPrmc2Q4mNVHBoXU2OD71q7TkJGV8MSCi5D7Ss3kdq+ ZRrwWRdjZckbLmX008LNmi8VQi1Y+3wJDq6JHBV56zJXmNQZ/ALkxgg1Eyw89Fb2Ja0g isBSQsJXBELFw6Rd0fMQm2JG2TLXu/y3N39rhywqYF2yjiQl9CrIvZ55qd3gJuRl1dSd Kckg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RDQ3xx80SRyQFwywcrombnQRB2XWBbCFo3YhVjtFhAY=; b=l91xyJHJ0jsAlPTnwd2EkJo61a47TOzYkjw266wJbqUqvTDKGLzi5GfEHu+DATq9r2 gjDmAQlcKWeeFFGb+jn/Ogphrj+e3Vkkwc4REz1LlwqXFaOfFuW7BFDG/M4DKhsff/n9 QBciPR9jyg1iugzbev5+YU4/gUEmub5j3E4t5NAs9va6Z4/E8KIjEhhaOGxBgWZqgTtp FFwXPOVRJ5nl/OxqJGQOGoyaBInYQ7P9++qc2pdgy+2hKq/CiLFoqUNi3p8tsqsR0hVj FdjN19+pJqHrL4RZjRzDUnY75Vv5iJ8WtGnrrivzPhcIk1AGf4d8XqJDs9dPKUkcWZKx jybA== X-Gm-Message-State: ABuFfohoXmnyYSK3eK9Qn6C8WvzzHiWn87wmfhEQRqeIIvVkYBmjknhR iNXUpW1/50efckdWwwDQTTxnfSSWjp3m+u2p6vJcCg== X-Received: by 2002:ac8:248c:: with SMTP id s12-v6mr2217259qts.116.1537908004234; Tue, 25 Sep 2018 13:40:04 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:2abb:0:0:0:0:0 with HTTP; Tue, 25 Sep 2018 13:40:03 -0700 (PDT) In-Reply-To: References: From: Joel Fernandes Date: Tue, 25 Sep 2018 13:40:03 -0700 Message-ID: Subject: Re: [PATCH 2/6] pstore: Add event tracing support To: Sai Prakash Ranjan Cc: Joel Fernandes , Steven Rostedt , Ingo Molnar , Laura Abbott , Kees Cook , Anton Vorontsov , Rob Herring , devicetree@vger.kernel.org, Colin Cross , Jason Baron , Tony Luck , Arnd Bergmann , Catalin Marinas , Will Deacon , Masami Hiramatsu , Joe Perches , Jim Cromie , Rajendra Nayak , Vivek Gautam , Sibi Sankar , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , LKML , linux-arm-msm@vger.kernel.org, Greg Kroah-Hartman , Ingo Molnar , Tom Zanussi , Prasad Sodagudi , tsoni@codeaurora.org, Bryan Huntsman , Tingwei Zhang , kernel-team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 25, 2018 at 1:39 PM, Joel Fernandes wrote: > On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: >> On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan >> wrote: >>> On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: >>>> >>>> On 9/22/2018 2:35 PM, Joel Fernandes wrote: >>>>> >>>>> On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan >>>>> wrote: >>>>>> >>>>>> >>>>>> + >>>>>> + trace_seq_init(&iter->seq); >>>>>> + iter->ent = fbuffer->entry; >>>>>> + event_call->event.funcs->trace(iter, 0, event); >>>>>> + trace_seq_putc(&iter->seq, 0); >>>>> >>>>> >>>>> Would it be possible to store the binary trace record in the pstore >>>>> buffer instead of outputting text? I suspect that will both be faster >>>>> and less space. >>>>> >>>> >>>> I will try this and come back. >>>> >>> >>> Hi Joel, >>> >>> I removed trace_seq_putc and there is some improvement seen: 203 MB/s >>> >>> # dd if=/dev/zero of=/dev/null status=progress >>> 12207371264 bytes (12 GB, 11 GiB) copied, 60 s, 203 MB/s^C >>> 24171926+0 records in >>> 24171926+0 records out >>> 12376026112 bytes (12 GB, 12 GiB) copied, 60.8282 s, 203 MB/s >>> >>> This seems good when compared to 190 MB/s seen previously. >>> If this is Ok, then I will spin v2 with changes suggested. >> >> Sorry for slow reply, yes that sounds good and a worthwhile perf improvement. >> > > Well so I think you should still not use spinlock to synchronize and > split the buffer. You could expand pstore_record to have a ts field or > introduce a new API like ->write_percpu instead of write, or > something. But I strongly feel you should lock. For ftrace function Aargh, I meant you should *not* lock :-)