From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ssagarr Patil Subject: RE: C_CAN: can frame drops Date: Thu, 31 Jul 2014 18:11:39 +0530 Message-ID: References: <53D204A4.1060502@pengutronix.de> <53D2126C.40600@pengutronix.de> <53D214E2.7020205@pengutronix.de> <53D219E8.5060307@pengutronix.de> <53D234D9.2010602@hartkopp.net> ,<53D91AB5.5060507@hartkopp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: from bay004-omc3s27.hotmail.com ([65.54.190.165]:63842 "EHLO BAY004-OMC3S27.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750702AbaGaMlk convert rfc822-to-8bit (ORCPT ); Thu, 31 Jul 2014 08:41:40 -0400 In-Reply-To: <53D91AB5.5060507@hartkopp.net> Sender: linux-can-owner@vger.kernel.org List-ID: To: Oliver Hartkopp , Prabhakar Lad Cc: Marc Kleine-Budde , "linux-can@vger.kernel.org" Hi Oliver, Sorry for the delayed response! was busy with other work load. > >>>>> If you want to log all CAN >>>>> messages, you can probably make use of recvmmsg() to receive more than >>>>> one CAN frame at a time (instead of using recvmsg() or read()). When >>>>> writing to disk, don't write a single CAN frame at a time, it's better >>>>> to write large blocks, i.e. several 4k of data. >>>>> >>>> I am using the v3.16 (the master branch from git://gitorious.org/linux-can/linux-can.git) >>>> >>>> OK will try experiment with recvmmsg() & and writing to disk with large blocks. >>>> >>> >>> I implemented a proof-of-concept for recvmmsg() for candump. >>> >>> You can try: >>> >>> https://gitorious.org/linux-can/canpump >>> >> >> Any plans of adding this into mainline can-utils ? >> > > Hm - currently not. > > If it turns out to really help to increase the throughput for e.g. candump it > would be worth thinking to integrate it into candump. > > But so far there was no feedback from Sagar, if it was at least helpful. > Yes it was beneficial I used MSG_WAITALL flag for recvmmsg() so that it waits for n frames and there is no memory wastage. Also is it possible to configure qdiscs for improving the performance ? Regards, --Sagar