Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp788223imm; Sat, 22 Sep 2018 10:34:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV63A/hc8ua0assdyiImUG+rBa6Qpi9w8+uH6GbMwqyik/MNCMtRup7EndwrftejoRfo9nFkR X-Received: by 2002:a17:902:d917:: with SMTP id c23-v6mr3411132plz.65.1537637671099; Sat, 22 Sep 2018 10:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537637671; cv=none; d=google.com; s=arc-20160816; b=ZoQUFG1auWs8gN7GYLByh57hBgEIBbJyB5r2Khbz9eHUh8e3TsJlY/Ys9NMBGGbLru e1WCtPQ/VXeEdbrlAwbA/gMzzfT87WDq3xH+oT8BFmm/SH/+Wbi4ptDPHb/oBSLQii46 23yE3UtpekInGOHJlSr0x7r6OaLVxLSER7a7b4KX34wFfH4HbvSIWJ1V8i74BJWWXbDt nuMk5SSceIeSjWk535uFCMatEXOageKKXxjQ88tlc797gLIY9QOItMCd0jb+NpCpukbW prA09jLoM8L8IN7PkaAALAoABJ1syv/86o59B6/7AcQUPzgYOuiLCbqVONUGt380BCXr /aJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dmarc-filter :dkim-signature:dkim-signature; bh=qthGKAxOLk1qynpWkjUwDRO1qQ+PTBcheEzDi5jb5wY=; b=B86oW0n0DF8zlRlJ4oNpLmhq5IBLF8u/jpgikl+0wPaa8Ieeve6V28XrQ708R3KXju H3xavYhP+cwx7U8JrZ7XhnUVWed5MHHQxNL1P6v05E4jt3UI5ANdxZapEU4CHGjJYAaE 7VaVBFNyp8dPOKaTKPmHHjXC6KndEd9ry3jP/mQlArXOvpsHzC2sTElh/iu1l2DKTLFZ z+kIKZ7fTnaq9e6OGdDtKaZlUJQpnMR4idXWM6dXBMwYId9LI/bD+DKZNz78ty6U4MRc YB8EyJnzb5hefFB+fLs7BoQeKDXHHhIjY93oOVh8Cy1+/0IQai4kRFCqvJ4JFWrQPW+X jRyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=QqhA21E5; dkim=pass header.i=@codeaurora.org header.s=default header.b=odUpehAV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si32283561pfe.31.2018.09.22.10.34.15; Sat, 22 Sep 2018 10:34:31 -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=@codeaurora.org header.s=default header.b=QqhA21E5; dkim=pass header.i=@codeaurora.org header.s=default header.b=odUpehAV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728121AbeIVX1O (ORCPT + 99 others); Sat, 22 Sep 2018 19:27:14 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54794 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726004AbeIVX1O (ORCPT ); Sat, 22 Sep 2018 19:27:14 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0321360E58; Sat, 22 Sep 2018 17:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1537637574; bh=JoTkmxJkK9Zvvar1YesuDCKF9QJ2EJWCVqUjksi3Dv0=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=QqhA21E5xp4mwB2ue42Y0+XtYP+DjRi35p/KHRMbIQ8ca4iTYhLHlf1Hr4hffz3F9 rpBGjApFktRVBaDGU0tTvOdHiXgSoxkNOqCSDoTtT4HHBceHsdP4x08BpBGMW4I4JG 98KzoyN1Zi9z91/YG9Tl540qJ2EHyI78IvtCk/ZA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.43.47] (unknown [223.237.247.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5AEBD60CA2; Sat, 22 Sep 2018 17:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1537637572; bh=JoTkmxJkK9Zvvar1YesuDCKF9QJ2EJWCVqUjksi3Dv0=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=odUpehAVFYG5vrgTe1PV2hNylXHmgUN30IZbxpYzLiLUlGptgd/1OskLcuoKLDF0q /vz8VXFkJhj22FMn5c5cPdcgv97hzeW8rQN2ks13APWR4Q0AA0EUADOC+vjSzNRBQc 18MaHHs25rKJzAs9Tzet2OPcd9CwrXr059/GyESE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5AEBD60CA2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org Subject: Re: [PATCH 2/6] pstore: Add event tracing support From: Sai Prakash Ranjan To: Joel Fernandes Cc: 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 , linux-arm-kernel@lists.infradead.org, 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 References: Message-ID: Date: Sat, 22 Sep 2018 23:02:37 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: >>> >> Could you just split the pstore space into a per-cpu event buffer like >> we are doing for ftrace-on-pstore? Then you don't need to lock. I fear >> the lock contention will be apparent. The pstore code already has >> plumbing to split the store buffer per CPU. >> > > Hi Joel, > > Thanks a lot for reviewing. > > I just looked at per-cpu buffer for ftrace and itseems the pstore percpu > records will need to be merged into one record if we add this support > for events. Merging of ftrace logs is based on timestamp, but for events > we do not have timestamp field (for this specific reason I have added > timestamp field for IO event tracing so that atleast we can know the cpu > number in pstore output). For example, the sched event pstore output > below has no timestamp field, so how do we merge per-cpu logs? > > # tail /sys/fs/pstore/event-ramoops-0 > sched_waking: comm=rcu_sched pid=11 prio=120 target_cpu=002 > sched_wakeup: comm=rcu_sched pid=11 prio=120 target_cpu=002 > > Also Pstore ftrace log format is fixed i.e.,(CPU:%d ts:%llu %08lx  %08lx >  %pf <- %pF\n"), but different events will have different formats and > we will not be able to add timestamp field like how pstore ftrace does > using  pstore_ftrace_write_timestamp() and pstore_ftrace_read_timestamp(). > > Sorry if I am confusing you, I can explain better I guess. > To add to this on db410c board with the current patch I just measured average throughput of dd over 60 seconds with sched event tracing enabled (trace_event=sched tp_pstore) : 190 MB/s # dd if=/dev/zero of=/dev/null status=progress 11402907648 bytes (11 GB, 11 GiB) copied, 60 s, 190 MB/s^C 22430312+0 records in 22430312+0 records out 11484319744 bytes (11 GB, 11 GiB) copied, 60.4277 s, 190 MB/s It seems fine or maybe I am testing it wrongly? Anyways let me know if I can test any additional things in some different ways. Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation