Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4654021imu; Mon, 12 Nov 2018 14:52:11 -0800 (PST) X-Google-Smtp-Source: AJdET5dQTrwt61j7P2EVV3n6lA3oDeb8tI4OLs7U8ReedStJ0WTO473HZ2JnhFq94YLaF7kuTkle X-Received: by 2002:a17:902:e081:: with SMTP id cb1-v6mr2654726plb.206.1542063131036; Mon, 12 Nov 2018 14:52:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542063131; cv=none; d=google.com; s=arc-20160816; b=WgV3YhvVPyjWwW4/vWpOIusC6K9H4fnWcpe3uh0Sl2qfUYpG8Obp0ykH+0s8+JHgMB +0n/GML83Rb687LdH+MgXA6e6/okgH/vyE905tI8mDFaLbVuEmISUola3tT1D6HbPzhW 7JASQs2p28g856M38q4dBKeI6QHgQzqJAV0lo2fNqhSqERaKiDNEjUIESH+o0BdVxVPW ElxKiPFnAgDfjDDLy5mmjUTQVuD2Le1BAgXoLFW/nwUW10+bMwfLYQ/R2DpM+ksxYFVT fMk9HqP3yz8ky9kRiqkAFBLCn2mXWw5EePmDIYTuCCjF0B2zxbVgNMbn6vDsldDZN7G6 qkcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=u2I3lleif1LwqvUPU8mlVLfVHRKdKHBJC4cgK7KeorM=; b=WAb1h+kd5c2RlfvUDDXwtW5s2+6bRiOk+duKduWHmHFE2rdgGZGefvx/IPWugGyhq8 je9R+zlkscTm90uhmrL7rvxg8svv1NVOOboinlEy6mFkNK5P/ePlQn0e/tsJVhSsVyeY LbUHhZntG/LlqaD7Doqogik0ntRCT3Rak0uNOrvggCSlUw7NT6N+UwMeGF0SicAn7hzC McZY6z3LY7CX0T2u7V4pXbqyku/VtXLQUj9wlXJHtasJLapjb3L8venaU2C7HFt9mXwM EEia0P5h94ZvHLwFbybsCfL1HjTKi61XIcibziqZCfmLQNOlV4XivzZ+PjphKP9kADTP il1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=iUCgkp8I; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si18079676pgs.267.2018.11.12.14.51.55; Mon, 12 Nov 2018 14:52:11 -0800 (PST) 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=@cisco.com header.s=iport header.b=iUCgkp8I; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727551AbeKMIpc (ORCPT + 99 others); Tue, 13 Nov 2018 03:45:32 -0500 Received: from rcdn-iport-1.cisco.com ([173.37.86.72]:22564 "EHLO rcdn-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbeKMIpc (ORCPT ); Tue, 13 Nov 2018 03:45:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4033; q=dns/txt; s=iport; t=1542063018; x=1543272618; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=sGEiZfakvkWg8q9AwIiNNGa5++DUzv8jLA35ZPxRBZQ=; b=iUCgkp8IZmCxsMcNYgCVFClAXexZO1pgb/XvlFEHi9oT2tSN1NRLXvGO dYhMszVACaK4KYqlZ+PQBO0ATVf0VdrAZeiETHMbDa57l6fzip2W+xZAt G2vB6VsWANPjq3Q1hQlnuuGw1Z3Lu2X1zt3JcPKF2I5Ysr7B2FymuaVM1 A=; X-IronPort-AV: E=Sophos;i="5.54,497,1534809600"; d="scan'208";a="480566188" Received: from rcdn-core-7.cisco.com ([173.37.93.143]) by rcdn-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2018 22:50:17 +0000 Received: from zorba ([10.154.176.235]) by rcdn-core-7.cisco.com (8.15.2/8.15.2) with ESMTPS id wACMoGcr009837 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Nov 2018 22:50:17 GMT Date: Mon, 12 Nov 2018 14:50:15 -0800 From: Daniel Walker To: David Woodhouse Cc: "Nikunj Kela (nkela)" , Richard Weinberger , "linux-mtd @ lists . infradead . org" , LKML , "xe-linux-external(mailer list)" Subject: Re: [PATCH] jffs2: implement mount option to configure endianness Message-ID: <20181112225015.jyuro3z3ygavnvrp@zorba> References: <20181106214928.40020-1-nkela@cisco.com> <921b0f78cf67d7307a0555e1fd6f2c2976310adc.camel@infradead.org> <591D4732-BC3E-4F85-9277-25E049FFF4BA@cisco.com> <01b82f6eb37b674effc6c8b0fa4a014deb401a85.camel@infradead.org> <897867ec09af82ca76c642b48ad23a7f08838dcf.camel@infradead.org> <20181112214333.lplffcc722hta43v@zorba> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181112214333.lplffcc722hta43v@zorba> User-Agent: NeoMutt/20170609 (1.8.3) X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.154.176.235, [10.154.176.235] X-Outbound-Node: rcdn-core-7.cisco.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 12, 2018 at 01:43:33PM -0800, Daniel Walker wrote: > On Thu, Nov 08, 2018 at 07:47:08PM +0000, David Woodhouse wrote: > > On Thu, 2018-11-08 at 18:01 +0000, Nikunj Kela (nkela) wrote: > > > But we can hypothesise and handwave about it until the cows come home; > > > I'd like to see a real test of whether it actually makes a difference > > > that we care about. > > > > > > If it does, one option might be to just build separate versions of > > > scan.c for each endianness, since that's the critical path we care > > > about. > > > > > > I wonder if this feature is really that important that we need to duplicate the drivers. > > > Also, it might take some time for me to find some device that I can run the tests with and without this patch. > > > > Hm? > > > > # modprobe mtdram size=16384 > > # mount -tjffs2 mtd0 /mnt > > # cp -av .git /mnt # until it fills up > > # umount /mnt > > # perf record mount -tjffs2 mtd0 /mnt > > > > On my desktop 'perf' only gets about 12 samples from that, so it's not > > ideal. But you can make the mtdram device bigger, use something other > > than my shiny new laptop, and use a higher sample frequency from 'perf' > > and you should be able to get some vaguely meaningful results. > > > Made a little mistake. The first tests were with Nikunj's very first version which was just a pure Kconfig option. I reran the test of the second version and increased the mtdram space to 100megs. baseline below, sh-4.2# perf stat -B mount -t jffs2 /dev/mtdblock7 /mnt jffs2: Flash size not aligned to erasesize, reducing to 99944KiB Performance counter stats for 'mount -t jffs2 /dev/mtdblock7 /mnt': 100.303072 task-clock # 0.775 CPUs utilized 19 context-switches # 0.189 K/sec 0 cpu-migrations # 0.000 K/sec 94 page-faults # 0.937 K/sec 134135872 cycles # 1.337 GHz [92.88%] 29217497 stalled-cycles-frontend # 21.78% frontend cycles idle [92.02%] 10493221 stalled-cycles-backend # 7.82% backend cycles idle [92.05%] 136740541 instructions # 1.02 insns per cycle # 0.21 stalled cycles per insn [92.04%] 14639149 branches # 145.949 M/sec [19.06%] 1384856 branch-misses # 9.46% of all branches [16.29%] 0.129377322 seconds time elapsed This is with the mount option changes added. sh-4.2# perf stat -B mount -t jffs2 /dev/mtdblock7 /mnt jffs2: Flash size not aligned to erasesize, reducing to 99944KiB Performance counter stats for 'mount -t jffs2 /dev/mtdblock7 /mnt': 100.516160 task-clock # 0.315 CPUs utilized 14 context-switches # 0.139 K/sec 0 cpu-migrations # 0.000 K/sec 94 page-faults # 0.935 K/sec 129255757 cycles # 1.286 GHz [19.32%] 26930446 stalled-cycles-frontend # 20.84% frontend cycles idle [92.00%] 10068627 stalled-cycles-backend # 7.79% backend cycles idle [92.05%] 138000320 instructions # 1.07 insns per cycle # 0.20 stalled cycles per insn [92.04%] 26158985 branches # 260.247 M/sec [90.09%] 1242606 branch-misses # 4.75% of all branches [19.24%] 0.319593555 seconds time elapsed It looks like the took slightly more than twice as long to mount. Daniel