Embedded Linux development
 help / color / mirror / Atom feed
* Re: Need help adding platform UIO devices to board
From: Nicholas Mc Guire @ 2012-11-28 19:03 UTC (permalink / raw)
  To: Alexander Varnin; +Cc: linux-embedded
In-Reply-To: <50B65DA3.9000707@mail.ru>

On Wed, 28 Nov 2012, Alexander Varnin wrote:

> Hello!
> I'm trying to add UIO device to my system to handle interrupt. But i'm
> facing following problem. Docs says, on reading device /dev/uio0 it will
> block until interrupt occurs. I've made simple program for test. It
> tries to write 1 to enable interrupts.
> 
>     #include <unistd.h>
>     #include <errno.h>
>     #include <fcntl.h>
>     #include <stdio.h>
> 
>     int main()
>     {
>         int fd;
>         char c = 1;
>         fd = open("/dev/uio0", O_RDONLY);
>         if (fd<0) {
>             printf("open error: %d\n", errno);
>              return 0;
>         }
>         printf("fd == %d\n", fd);
>         int res = write(fd, &c, 1);
>         if(res<0) {
>             printf("write error: %d\n", errno);
>         }
>         return 0;
>     }
>
open O_RDONLY and then write to it ?

return of 9 == EBADF

man 2 write

 EBADF  fd is not a valid file descriptor or is not open for writing.

hofrat 

^ permalink raw reply

* Re: Need help adding platform UIO devices to board
From: Alexander Varnin @ 2012-11-29  9:29 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: linux-embedded
In-Reply-To: <20121128190353.GA20385@opentech.at>

28.11.2012 23:03, Nicholas Mc Guire пишет:
> open O_RDONLY and then write to it ?
>
> return of 9 == EBADF
>
> man 2 write
>
>   EBADF  fd is not a valid file descriptor or is not open for writing.
>
> hofrat
Yes, sorry, stupid mistake.
But with the correct rights O_RDWR i get error 22 EINVAL both on read 
and write.
So problem is still there.

^ permalink raw reply

* Re: Need help adding platform UIO devices to board
From: Alexander Varnin @ 2012-11-29  9:38 UTC (permalink / raw)
  To: 游競雄; +Cc: linux-embedded
In-Reply-To: <008d01cdce0d$d6ea04d0$84be0e70$@iii.org.tw>

Where to add printk?

29.11.2012 12:45, 游競雄 пишет:
> Did you add printk to understand what happened?
>
> BR

^ permalink raw reply

* Re: Need help adding platform UIO devices to board
From: Alexander Varnin @ 2012-11-29  9:47 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: linux-embedded
In-Reply-To: <50B72B0D.80904@mail.ru>

29.11.2012 13:29, Alexander Varnin пишет:
> 28.11.2012 23:03, Nicholas Mc Guire пишет:
> Yes, sorry, stupid mistake.
> But with the correct rights O_RDWR i get error 22 EINVAL both on read 
> and write.
> So problem is still there.
> -- 
> To unsubscribe from this list: send the line "unsubscribe 
> linux-embedded" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Seems to be solved.

Problem was due to lines

if (count != sizeof(s32))
return -EINVAL;

in uio_read kernel function.

I've made read of 4 bytes, and it is ok.

^ permalink raw reply

* opening DEBUG in compressed/head.S, kernel crashed
From: zhaoyilong @ 2013-01-13 12:38 UTC (permalink / raw)
  To: linux- embedded

 When I open the macro DEBUG in the front of  file
arch/arm/boot/decompressed/head.S,the kernel runs and stops at"Uncompressing
Linux... done, booting the kernel."
CONFIG_DEBUG_ICEDCC is closed by default, so I am sure  the code runs tothe
following branch:
...........
...........
...........
.macro kputc,val
mov r0, \val
bl putc
.endm

.macro kphex,val,len
mov r0, \val
mov r1, #\len
bl phex
.endm

.macro debug_reloc_start
#ifdef DEBUG
kputc #'\n'
kphex r6, 8 /* processor id */
kputc #':'
kphex r7, 8 /* architecture id */
...........
...........
...........

Problem is happened in a context like this:

    I have a board use cpu S5PV210,and an ok kernel provide by the factory
anda  kernel download from kernel.org which carshed after printing "starting
kernel..." to dnw.
    To debug this,I want to test the macro kputc provided in this file¡ª¡ª
using ok kernel.
I add a line "kputc #'a' " after the tag ".text", then make error says
"undefined reference to `putc' ",it seems that compiler cant find "putc"
used in
the definition of macro ¡°kputc¡±.
    This is an ok kernel,so I cant say the serial port is not open¡ª¡ªcan
this mean "putc" is defined already?.

So I open DEBUG hoping to see debugging info by kernel itself,but it stops
at"Uncompressing Linux... done, booting the kernel."
Opening DEBUG will lead to the call of ¡°kputc #'\n' ¡± in the code above
which will also call putc!

Here,my questions comes:

1¡¢Why the error "  undefined reference to `putc'  " disappeared?
2¡¢Why it stops at"Uncompressing Linux... done, booting the kernel."?
3¡¢Can this error ( undefined reference to `putc'  ) mean the serial port is
not open? Where is it defined ?
Is it refer to the C function or just an assembly macro£¿ 


^ permalink raw reply

* [head.S]open DEBUG in compressed/head.S, kernel crashed...
From: zhaoyilong @ 2013-01-14  1:32 UTC (permalink / raw)
  To: linux- embedded

When I open the macro DEBUG in the front of  file
arch/arm/boot/decompressed/head.S,the kernel runs and stops at"Uncompressing
Linux... done, booting the kernel."
CONFIG_DEBUG_ICEDCC is closed by default, so I am sure  the code runs tothe
following branch:
...........
...........
...........
.macro kputc,val
mov r0, \val
bl putc
.endm

.macro kphex,val,len
mov r0, \val
mov r1, #\len
bl phex
.endm

.macro debug_reloc_start
#ifdef DEBUG
kputc #'\n'
kphex r6, 8 /* processor id */
kputc #':'
kphex r7, 8 /* architecture id */
...........
...........
...........

Problem is happened in a context like this:

    I have a board use cpu S5PV210,and an ok kernel provide by the factory
anda  kernel download from kernel.org which carshed after printing "starting
kernel..." to dnw.
    To debug this,I want to test the macro kputc provided in this file¡ª¡ª
using ok kernel.
I add a line "kputc #'a' " after the tag ".text", then make error says
"undefined reference to `putc' ",it seems that compiler cant find "putc"
used in
the definition of macro ¡°kputc¡±.
    This is an ok kernel,so I cant say the serial port is not open¡ª¡ªcan
this mean "putc" is defined already?.

So I open DEBUG hoping to see debugging info by kernel itself,but it stops
at"Uncompressing Linux... done, booting the kernel."
Opening DEBUG will lead to the call of ¡°kputc #'\n' ¡± in the code above
which will also call putc!

Here,my questions comes:

1¡¢Why the error "  undefined reference to `putc'  " disappeared?
2¡¢Why it stops at"Uncompressing Linux... done, booting the kernel."?
3¡¢Can this error ( undefined reference to `putc'  ) mean the serial port is
not open? Where is it defined ?
Is it refer to the C function or just an assembly macro£¿


^ permalink raw reply

* I can only receive email from lkml,why?
From: zhaoyilong @ 2013-01-15  6:51 UTC (permalink / raw)
  To: chuansheng.liu; +Cc: linux- embedded

Are you chinese?

Sorry to disturb you for a simple question.

I have set text coded with utf-8 and use plain text rather than html.

But why cant I receive email from lkml?
thx!


^ permalink raw reply

* Re: I can only receive email from lkml,why?
From: Steven J. Hill @ 2013-01-15 15:19 UTC (permalink / raw)
  To: zhaoyilong; +Cc: chuansheng.liu, linux- embedded
In-Reply-To: <DEF31CF8E8D94A6DBE84EC341CC50655@VIU9IM6TKCWEEDX>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/15/2013 12:51 AM, zhaoyilong wrote:
> Are you chinese?
> 
> Sorry to disturb you for a simple question.
> 
> I have set text coded with utf-8 and use plain text rather than html.
> 
> But why cant I receive email from lkml? thx!
> 
Because this is the 'linux-embedded' mailing list?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlD1c2UACgkQgyK5H2Ic36dGbQCdFQDjebWU09dOE58CdVjdP9ri
WDEAn158GtamdlM2eSfqF5tcsPzm4MMj
=Epva
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: I can only receive email from lkml,why?
From: zhaoyilong @ 2013-01-16  7:05 UTC (permalink / raw)
  To: linux- embedded, Steven J. Hill
In-Reply-To: <50F57365.90000@realitydiluted.com>

sorry,but I mean all the lists from majordomo.
Since you can see a email semd to someone(not you) and copy to 
linux-embeded,is that mean I am successed in joining to this list?

But nobody answer my first question emailed.Is it because my question too 
easy? nobody answer easy question ,is this a normal phenomenon?
----- Original Message ----- 
From: "Steven J. Hill" <sjhill@realitydiluted.com>
To: "zhaoyilong" <registcn@gmail.com>
Cc: <chuansheng.liu@intel.com>; "linux- embedded" 
<linux-embedded@vger.kernel.org>
Sent: Tuesday, January 15, 2013 11:19 PM
Subject: Re: I can only receive email from lkml,why?


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 01/15/2013 12:51 AM, zhaoyilong wrote:
>> Are you chinese?
>>
>> Sorry to disturb you for a simple question.
>>
>> I have set text coded with utf-8 and use plain text rather than html.
>>
>> But why cant I receive email from lkml? thx!
>>
> Because this is the 'linux-embedded' mailing list?
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlD1c2UACgkQgyK5H2Ic36dGbQCdFQDjebWU09dOE58CdVjdP9ri
> WDEAn158GtamdlM2eSfqF5tcsPzm4MMj
> =Epva
> -----END PGP SIGNATURE----- 


^ permalink raw reply

* Re: I can only receive email from lkml,why?
From: Vladimir Murzin @ 2013-01-16  7:45 UTC (permalink / raw)
  To: zhaoyilong, linux-embedded-owner, linux- embedded, Steven J. Hill
In-Reply-To: <332D9BE41E234CB9A30949E739F17209@VIU9IM6TKCWEEDX>

HI!

Have you checked settings for your spam filter?

Best wishes
Vladimir
--

-----Original Message-----
From:	"zhaoyilong" <registcn@gmail.com>
Sender:	linux-embedded-owner@vger.kernel.org
Date:	Wed, 16 Jan 2013 15:05:18 
To: linux- embedded<linux-embedded@vger.kernel.org>; Steven J. Hill<sjhill@realitydiluted.com>
Subject: Re: I can only receive email from lkml,why?

sorry,but I mean all the lists from majordomo.
Since you can see a email semd to someone(not you) and copy to 
linux-embeded,is that mean I am successed in joining to this list?

But nobody answer my first question emailed.Is it because my question too 
easy? nobody answer easy question ,is this a normal phenomenon?
----- Original Message ----- 
From: "Steven J. Hill" <sjhill@realitydiluted.com>
To: "zhaoyilong" <registcn@gmail.com>
Cc: <chuansheng.liu@intel.com>; "linux- embedded" 
<linux-embedded@vger.kernel.org>
Sent: Tuesday, January 15, 2013 11:19 PM
Subject: Re: I can only receive email from lkml,why?


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 01/15/2013 12:51 AM, zhaoyilong wrote:
>> Are you chinese?
>>
>> Sorry to disturb you for a simple question.
>>
>> I have set text coded with utf-8 and use plain text rather than html.
>>
>> But why cant I receive email from lkml? thx!
>>
> Because this is the 'linux-embedded' mailing list?
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlD1c2UACgkQgyK5H2Ic36dGbQCdFQDjebWU09dOE58CdVjdP9ri
> WDEAn158GtamdlM2eSfqF5tcsPzm4MMj
> =Epva
> -----END PGP SIGNATURE----- 


--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* How to use DEBUG macros in compressed/head.S
From: zhaoyilong @ 2013-01-16  8:17 UTC (permalink / raw)
  To: linux- embedded

When I open the macro DEBUG in the front of  file
arch/arm/boot/decompressed/head.S,the kernel runs and stops at"Uncompressing
Linux... done, booting the kernel."
CONFIG_DEBUG_ICEDCC is closed by default, so I am sure  the code runs tothe
following branch:
...........
...........
...........
.macro kputc,val
mov r0, \val
bl putc
.endm

.macro kphex,val,len
mov r0, \val
mov r1, #\len
bl phex
.endm

.macro debug_reloc_start
#ifdef DEBUG
kputc #'\n'
kphex r6, 8 /* processor id */
kputc #':'
kphex r7, 8 /* architecture id */
...........
...........
...........

Problem is happened in a context like this:

    I have a board use cpu S5PV210,and an ok kernel provide by the factory
anda  kernel download from kernel.org which carshed after printing "starting
kernel..." to dnw.
    To debug this,I want to test the macro kputc provided in this file——
using ok kernel.
I add a line "kputc #'a' " after the tag ".text", then make error says
"undefined reference to `putc' ",it seems that compiler cant find "putc"
used in
the definition of macro “kputc”.
    This is an ok kernel,so I cant say the serial port is not open——can
this mean "putc" is defined already?.

So I open DEBUG hoping to see debugging info by kernel itself,but it stops
at"Uncompressing Linux... done, booting the kernel."
Opening DEBUG will lead to the call of “kputc #'\n' ” in the code above
which will also call putc!

Here,my questions comes:

1?Why the error "  undefined reference to `putc'  " disappeared?
2?Why it stops at"Uncompressing Linux... done, booting the kernel."?
3?Can this error ( undefined reference to `putc'  ) mean the serial port is
not open? Where is it defined ?
Is it refer to the C function or just an assembly macro?


^ permalink raw reply

* Re: How to use DEBUG macros in compressed/head.S
From: Baurzhan Ismagulov @ 2013-01-16 10:30 UTC (permalink / raw)
  To: linux-embedded; +Cc: registcn
In-Reply-To: <94B6F8A1EDC14A8CB9308D5F65F19892@VIU9IM6TKCWEEDX>

Hello zhaoyilong,

I do get your mails.

On Wed, Jan 16, 2013 at 04:17:39PM +0800, zhaoyilong wrote:
> CONFIG_DEBUG_ICEDCC is closed by default, so I am sure  the code runs tothe
> following branch:
...
> .macro kputc,val
...
> .macro kphex,val,len
...
> .macro debug_reloc_start
...

What do you mean by "branch"? Those are macro definitions that are
expanded inline by the assembler.


>     To debug this,I want to test the macro kputc provided in this file——
> using ok kernel.

So you have a vendor kernel that works on your board? That is good.


> I add a line "kputc #'a' " after the tag ".text", then make error says
> "undefined reference to `putc' ",it seems that compiler cant find "putc"
> used in
> the definition of macro “kputc”.
>     This is an ok kernel,so I cant say the serial port is not open——can
> this mean "putc" is defined already?.

We don't have your vendor's kernel, so no one except your vendor can
tell. Possibly DEBUG support for head.S is broken in that tree.


> 1?Why the error "  undefined reference to `putc'  " disappeared?

What do you mean by "disappeared"? Do I understand correctly, the vendor
kernel didn't build with DEBUG enabled, and still doesn't? And the
mainline kernel does build? If so, the vendor kernel is broken w.r.t.
DEBUG in head.S.


> 2?Why it stops at"Uncompressing Linux... done, booting the kernel."?

Often it's an exception somewhere. It may be an exception in kputc. So
it's important to know whether kputc works in a working kernel, which
you can't test since the vendor kernel doesn't build with DEBUG in
head.S.


> 3?Can this error ( undefined reference to `putc'  ) mean the serial port is
> not open? Where is it defined ?
> Is it refer to the C function or just an assembly macro?

Since it's called from the assembly code, I'd assume it's a macro. Grep
for it in the mainline kernel and see whether it exists at the same
location in the vendor kernel.


That said, in my experience, the problem start later. So if your goal is
to port the board support code from the vendor kernel to the mainline
one (which is a good idea), start with it: Copy the board support file
to the mainline kernel and run that kernel. If it doesn't work, there is
a couple of things to check, such as machine id and serial console. If
you can get a JTAG debugger (e.g., an OpenOCD one), it would help.


With kind regards,
Baurzhan.

^ permalink raw reply

* Re: How to use DEBUG macros in compressed/head.S
From: Rob Landley @ 2013-01-16 17:05 UTC (permalink / raw)
  To: zhaoyilong; +Cc: linux- embedded
In-Reply-To: <94B6F8A1EDC14A8CB9308D5F65F19892@VIU9IM6TKCWEEDX>

On 01/16/2013 02:17:39 AM, zhaoyilong wrote:
> When I open the macro DEBUG in the front of  file
> arch/arm/boot/decompressed/head.S,the kernel runs and stops  
> at"Uncompressing
> Linux... done, booting the kernel."

No, that's just the last thing it output.

I seldom find other people's debug code useful. I stick a printf()  
variant in the code at a place I want to see what it's doing, and then  
I know what the output means. I only enable their debug code if I'm  
sending the output to the person who wrote said debug code. (There are  
exceptions, but they're exceptions to a useful rule of thumb.)

At this level, you can do direct writes to the serial chip ala:

    
http://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/

Note that's for qemu, which pauses when it gets a port write. For real  
hardware you need to check the status bit before sending the next  
character, basically spinning on a port read until the relevant bit  
gets set/cleared to indicate the hardware's done with the last thing  
you sent it. I don't remember the check off the top of my head (last  
time I needed it I dug it out of the uboot source), but if you're just  
debugging you can do a delay loop between each write. (This is assuming  
your serial port is already set to the right speed, which it had to be  
to spit out the above message. Presumably the bootloader did it for  
you.)

(And this is assuming your board layout has an 8250/16550a UART variant  
mapped at a knowable address, which basically they all do because it's  
dirt simple and the patents expired years ago. They get weird and  
bespoke about setting buffer sizes but you don't really have to care at  
this level.)

Most likely you can find whatever spit out the text you _did_ see, and  
copy it to produce more text from places in the code you'd like  
visibility into.

Rob

^ permalink raw reply

* Need help to measure and tune the latency in Linux RT
From: Ashoka K @ 2013-04-30  8:27 UTC (permalink / raw)
  To: linux-embedded, linux-newbie

Hi,

I have an embedded system running 2.6.33 cross compiled for ARM OMAP
with 1 GHZ uni-processor system.

The application has many threads and processes (around 15 total). In
that 1 thread is time critical and must run every interval confiurable
as 2, 4 or 8 milli sec etc. There is another thread which transfers
Images to a FTP or to HMI etc, whoever requested the image.
With this image transfer enabled my critical process misses the
deadline and timesout. This critical thread is at RR priority 50. I
used a HR timer thread with RR pri 55 to wakeup the critical thread
every 1 milli sec to do the job.
If image transfer is enabled i see that real time thread misses deadlines.

All traffic is flowing on common ethernet connection. Does it affect
in any way ?

How to find out where the kernel is waiting or delaying to schedule
the critical thread even though it is at higher RR priority. How to
measure the latency ?

I am trying to use Oprofile tool, but got some error in cross
compiling. Doesn't these tools add their own latency to the original
problem ?

Any tools ? which one is better. Please provide your input on this.


Regards
Ashoka.  K
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply

* Re: Need help to measure and tune the latency in Linux RT
From: Jason Cooper @ 2013-04-30 11:10 UTC (permalink / raw)
  To: Ashoka K; +Cc: linux-embedded, linux-newbie, Linux ARM Kernel, linux-rt-users
In-Reply-To: <CALJd4cbfqRFiGHshv8A+0A8kFo_qW=rvREsdgj3jQ=-0Rix0-g@mail.gmail.com>

Ashoka,

linux-embedded is pretty quiet.  I'm not even sure why I'm still
subscribed to it.  You'll have better luck with your question by asking
on linux-arm-kernel (added to the cc).  I believe there is also a
linux-rt-users mailinglist [1].  A few comments below:

On Tue, Apr 30, 2013 at 01:57:21PM +0530, Ashoka K wrote:
> Hi,
> 
> I have an embedded system running 2.6.33 cross compiled for ARM OMAP
> with 1 GHZ uni-processor system.

Wow, this is ancient.  Is this a vanilla kernel?  If it's a vendor
kernel, you'll need to ask the vendor.

> The application has many threads and processes (around 15 total). In
> that 1 thread is time critical and must run every interval confiurable
> as 2, 4 or 8 milli sec etc. There is another thread which transfers
> Images to a FTP or to HMI etc, whoever requested the image.
> With this image transfer enabled my critical process misses the
> deadline and timesout. This critical thread is at RR priority 50. I
> used a HR timer thread with RR pri 55 to wakeup the critical thread
> every 1 milli sec to do the job.
> If image transfer is enabled i see that real time thread misses deadlines.
> 
> All traffic is flowing on common ethernet connection. Does it affect
> in any way ?
> 
> How to find out where the kernel is waiting or delaying to schedule
> the critical thread even though it is at higher RR priority. How to
> measure the latency ?
> 
> I am trying to use Oprofile tool, but got some error in cross
> compiling. Doesn't these tools add their own latency to the original
> problem ?
> 
> Any tools ? which one is better. Please provide your input on this.

I'm not the guy to answer this ;-)  I'll just forward to the appropriate
lists.

hth,

Jason.

[1] http://vger.kernel.org/vger-lists.html#linux-rt-users
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply

* Re: Need help to measure and tune the latency in Linux RT
From: ddegraff @ 2013-04-30 12:02 UTC (permalink / raw)
  To: Ashoka K; +Cc: linux-embedded, linux-newbie
In-Reply-To: <CALJd4cbfqRFiGHshv8A+0A8kFo_qW=rvREsdgj3jQ=-0Rix0-g@mail.gmail.com>


On 04/30/2013 03:27 AM, Ashoka K wrote:
> Hi,
>
> I have an embedded system running 2.6.33 cross compiled for ARM OMAP
> with 1 GHZ uni-processor system.

A project I am working on is using the same vintage kernel with RT 
patches applied, though on DaVinci (omap l138).

I, myself, however, have not dealt with any of that work, but I will ask 
the other developer if he has any suggestions.


>
> The application has many threads and processes (around 15 total). In
> that 1 thread is time critical and must run every interval confiurable
> as 2, 4 or 8 milli sec etc. There is another thread which transfers
> Images to a FTP or to HMI etc, whoever requested the image.
> With this image transfer enabled my critical process misses the
> deadline and timesout. This critical thread is at RR priority 50. I
> used a HR timer thread with RR pri 55 to wakeup the critical thread
> every 1 milli sec to do the job.
> If image transfer is enabled i see that real time thread misses deadlines.
>
> All traffic is flowing on common ethernet connection. Does it affect
> in any way ?
>
> How to find out where the kernel is waiting or delaying to schedule
> the critical thread even though it is at higher RR priority. How to
> measure the latency ?
>
> I am trying to use Oprofile tool, but got some error in cross
> compiling. Doesn't these tools add their own latency to the original
> problem ?
>
> Any tools ? which one is better. Please provide your input on this.
>
>
> Regards
> Ashoka.  K
> --
> To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply

* Re: Need help to measure and tune the latency in Linux RT
From: Stanislav Meduna @ 2013-04-30 12:13 UTC (permalink / raw)
  Cc: Ashoka K, linux-embedded, linux-newbie, Linux ARM Kernel,
	linux-rt-users
In-Reply-To: <20130430111021.GC31290@titan.lakedaemon.net>

>> This critical thread is at RR priority 50.

Try to put it higher than the irq thread handling your HD hardware.
I've even encountered hardware where I had to put the ATA thread
in the SHED_OTHER domain - see [1] for the thread.

>> I used a HR timer thread with RR pri 55 to wakeup the critical thread
>> every 1 milli sec to do the job.

Which prio is the ksoftirqd running at? The HRTIMER interrupts are
routed through it so it also has to be high enough.

I got burned with this myself [2]

Regards
                                     Stano

[1] http://www.spinics.net/lists/linux-rt-users/msg08711.html
[2] http://www.spinics.net/lists/linux-rt-users/msg08745.html


^ permalink raw reply

* Re: Need help to measure and tune the latency in Linux RT
From: Ashoka K @ 2013-04-30 13:17 UTC (permalink / raw)
  To: Stanislav Meduna
  Cc: linux-embedded, linux-newbie, Linux ARM Kernel, linux-rt-users
In-Reply-To: <517FB553.3000001@meduna.org>

Thanks for all the replies.
I am stuck with this issue for more tan a month. Explained this in
more detail at:

http://stackoverflow.com/questions/15805231/need-to-improve-the-linux-performance-for-embedded-system

But with no response from anyone.

I use PREEMPT patch for 2.6.33 vanilla kernel.

I have pasted all the processes running on my system:

  PID USER       VSZ STAT COMMAND
    1 root      3192 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [events/0]
    5 root         0 SW   [khelper]
    8 root         0 SW   [async/mgr]
   84 root         0 SW   [sync_supers]
   86 root         0 SW   [bdi-default]
   88 root         0 SW   [kblockd/0]
   91 root         0 SW   [omap2_mcspi]
  116 root         0 SW   [rpciod/0]
  123 root         0 SW   [kswapd0]
  124 root         0 SW   [aio/0]
  125 root         0 SW   [nfsiod]
  126 root         0 SW<  [kslowd001]
  127 root         0 SW<  [kslowd000]
  128 root         0 SW   [crypto/0]
  267 root         0 SW   [mtdblockd]
  351 root         0 SWN  [jffs2_gcd_mtd8]
  359 root      3192 S    /sbin/syslogd
  361 root      3192 S    /usr/sbin/telnetd
  364 root      1996 S    vsftpd
  410 root     43844 S   my_appl
  416 root     56412 S <  my_appl
  417 root     84804 S    my_appl
  418 root     43844 S    my_appl
  419 root     84824 S    my_appl
  430 root     46552 S <  my_appl

The process my_appl is my application processes.

the ksoftirq is running with SCHED_OTHER.

$ chrt -p 3
pid 3's current scheduling policy: SCHED_OTHER
pid 3's current scheduling priority: 0

I will test by changing ksoftirq priority to see how it works.

Regards
Ashoka.  K


On Tue, Apr 30, 2013 at 5:43 PM, Stanislav Meduna <stano@meduna.org> wrote:
>>> This critical thread is at RR priority 50.
>
> Try to put it higher than the irq thread handling your HD hardware.
> I've even encountered hardware where I had to put the ATA thread
> in the SHED_OTHER domain - see [1] for the thread.
>
>>> I used a HR timer thread with RR pri 55 to wakeup the critical thread
>>> every 1 milli sec to do the job.
>
> Which prio is the ksoftirqd running at? The HRTIMER interrupts are
> routed through it so it also has to be high enough.
>
> I got burned with this myself [2]
>
> Regards
>                                      Stano
>
> [1] http://www.spinics.net/lists/linux-rt-users/msg08711.html
> [2] http://www.spinics.net/lists/linux-rt-users/msg08745.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply

* 2013 Plumber's CFP: Fastboot
From: Mehaffey, John @ 2013-05-13 23:51 UTC (permalink / raw)
  To: tim.bird@am.sony.com, wd@denx.de, mzjro@0pointer.net,
	Kay.Sievers@vrfy.org, Pomerantz, Brian, yoush@cs.msu.su
  Cc: u-boot@lists.denx.de, genivi-dev@mail.genivi.org,
	systemd-devel@lists.freedesktop.org,
	celinux-dev@lists.celinuxforum.org, linux-kernel@vger.kernel.org,
	linux-embedded@vger.kernel.org

Hello All,

I am proposing a microconference on fastboot at the Linux Plumber's conference 2013 in New Orleans. The goal is to get to sub 1S boot times for a large (IVI) system using NAND flash. This pushes the state of the art, and will require innovative solutions in may areas of Linux plumbing, including bootloader, kernel init, UBI, and systemd.

Note that fastboot improvements will (generally) help all architectures so I am not limiting this to automotive systems.

Please visit http://wiki.linuxplumbersconf.org/2013:fastboot for more information or if you want to submit a topic.

If you want to reply to this message, please trim the cc list!

Sincerely,
John Mehaffey
Senior System Architect (Automotive)
Mentor Graphics Corporation

^ permalink raw reply

* Re: [U-Boot] 2013 Plumber's CFP: Fastboot
From: Thomas Petazzoni @ 2013-05-14 14:00 UTC (permalink / raw)
  To: Mehaffey, John
  Cc: tim.bird@am.sony.com, wd@denx.de, mzjro@0pointer.net,
	Kay.Sievers@vrfy.org, Pomerantz, Brian, yoush@cs.msu.su,
	systemd-devel@lists.freedesktop.org,
	linux-embedded@vger.kernel.org, linux-kernel@vger.kernel.org,
	u-boot@lists.denx.de, genivi-dev@mail.genivi.org,
	celinux-dev@lists.celinuxforum.org
In-Reply-To: <371E240E6FC1D44DA5E51EE9DCDCB7845E3D0BF9@NA-MBX-03.mgc.mentorg.com>

Dear Mehaffey, John,

On Mon, 13 May 2013 23:51:46 +0000, Mehaffey, John wrote:

> I am proposing a microconference on fastboot at the Linux Plumber's
> conference 2013 in New Orleans. The goal is to get to sub 1S boot
> times for a large (IVI) system using NAND flash. This pushes the
> state of the art, and will require innovative solutions in may areas
> of Linux plumbing, including bootloader, kernel init, UBI, and
> systemd.

Beware that the 'fastboot' you're talking about (making Linux boot
fast), especially written this way, may easily be confused with
'fastboot', which is the Android-specific protocol to flash a system
through USB (see
http://en.wikipedia.org/wiki/Android_software_development#Fastboot).

Besides this minor comment, I'm looking forward for the notes of this
discussion on this very interesting topic.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply

* Re: 2013 Plumber's CFP: Fastboot
From: richard -rw- weinberger @ 2013-05-14 15:10 UTC (permalink / raw)
  To: Mehaffey, John
  Cc: tim.bird@am.sony.com, wd@denx.de, mzjro@0pointer.net,
	Kay.Sievers@vrfy.org, Pomerantz, Brian, yoush@cs.msu.su,
	u-boot@lists.denx.de, genivi-dev@mail.genivi.org,
	systemd-devel@lists.freedesktop.org,
	celinux-dev@lists.celinuxforum.org, linux-kernel@vger.kernel.org,
	linux-embedded@vger.kernel.org
In-Reply-To: <371E240E6FC1D44DA5E51EE9DCDCB7845E3D0BF9@NA-MBX-03.mgc.mentorg.com>

On Tue, May 14, 2013 at 1:51 AM, Mehaffey, John
<John_Mehaffey@mentor.com> wrote:
> Hello All,
>
> I am proposing a microconference on fastboot at the Linux Plumber's conference 2013 in New Orleans. The goal is to get to sub 1S boot times for a large (IVI) system using NAND flash. This pushes the state of the art, and will require innovative solutions in may areas of Linux plumbing, including bootloader, kernel init, UBI, and systemd.
>
> Note that fastboot improvements will (generally) help all architectures so I am not limiting this to automotive systems.
>
> Please visit http://wiki.linuxplumbersconf.org/2013:fastboot for more information or if you want to submit a topic.
>
> If you want to reply to this message, please trim the cc list!

Why trimming the CC? Changing the CC list is a _very_ bad habit.

Anyway, a few notes on UBI fastmap.
Before we talk about optimizing it we have to make sure that it is stable.
Currently it has not much users because embedded folks are a few
kernel releases behind.
I expect that we'll face some issues (hey it's software!). Instead of
making the code more complicated we have to
make very sure that it works well.
Fastmap got much more complicated than I thought while developing the
first proof of concept implementation.

We also have to think more about userland support, e.g. making tools
like ubinize fastmap aware...
User want ready to use fastmap UBI images and not images which have to
be converted by the kernel on the very first boot.

Sharing UBI EBA table between U-Boot and the kernel would be a nice
feature, but we also have to make sure
that we can share the EBA table between two kernels (think of kexec).
So, a more general solution is needed.

--
Thanks,
//richard

^ permalink raw reply

* RE: 2013 Plumber's CFP: Fastboot
From: Mehaffey, John @ 2013-05-14 16:08 UTC (permalink / raw)
  To: richard -rw- weinberger
  Cc: tim.bird@am.sony.com, wd@denx.de, mzjro@0pointer.net,
	Kay.Sievers@vrfy.org, Pomerantz, Brian, yoush@cs.msu.su,
	u-boot@lists.denx.de, genivi-dev@mail.genivi.org,
	systemd-devel@lists.freedesktop.org,
	celinux-dev@lists.celinuxforum.org, linux-kernel@vger.kernel.org,
	linux-embedded@vger.kernel.org
In-Reply-To: <CAFLxGvxUFBHV4Y9vEVvhRR73tgLKFiRxHKo2F9p_5ZtYDDC_fw@mail.gmail.com>

> From: richard -rw- weinberger [richard.weinberger@gmail.com]
> Sent: Tuesday, May 14, 2013 8:10 AM
> To: Mehaffey, John
> Cc: tim.bird@am.sony.com; wd@denx.de; mzjro@0pointer.net; Kay.Sievers@vrfy.org; Pomerantz, Brian; yoush@cs.msu.su; u-boot@lists.denx.de; genivi-dev@mail.genivi.org; systemd-devel@lists.freedesktop.org; celinux-dev@lists.celinuxforum.org; linux-kernel@vger.kernel.org; linux-embedded@vger.kernel.org
> Subject: Re: 2013 Plumber's CFP: Fastboot
> 
> On Tue, May 14, 2013 at 1:51 AM, Mehaffey, John
> <John_Mehaffey@mentor.com> wrote:
> > Hello All,
> >
> > I am proposing a microconference on fastboot at the Linux Plumber's conference 2013 in New Orleans. The goal is to get to sub 1S boot times for a large (IVI) system using NAND flash. This pushes the state of the art, and will require innovative solutions in may areas of Linux plumbing, including bootloader, kernel init, UBI, and systemd.
> >
> > Note that fastboot improvements will (generally) help all architectures so I am not limiting this to automotive systems.
> >
> > Please visit http://wiki.linuxplumbersconf.org/2013:fastboot for more information or if you want to submit a topic.
> >
> > If you want to reply to this message, please trim the cc list!
> 
> Why trimming the CC? Changing the CC list is a _very_ bad habit.

Thanks for the advice.

> Anyway, a few notes on UBI fastmap.
> Before we talk about optimizing it we have to make sure that it is stable.
> Currently it has not much users because embedded folks are a few
> kernel releases behind.
> I expect that we'll face some issues (hey it's software!). Instead of
> making the code more complicated we have to
> make very sure that it works well.
> Fastmap got much more complicated than I thought while developing the
> first proof of concept implementation.

This is good software practice, but is out of scope for this uconf. Fastmap will be getting more usage in the future as systems deploy using it.

I think that low-hanging fruit to speed things up, such as Brian's RB-tree lookup, can proceed in parallel with testing and stabilization (hey, it's open-source software :)

> We also have to think more about userland support, e.g. making tools
> like ubinize fastmap aware...
> User want ready to use fastmap UBI images and not images which have to
> be converted by the kernel on the very first boot.
> 
> Sharing UBI EBA table between U-Boot and the kernel would be a nice
> feature, but we also have to make sure
> that we can share the EBA table between two kernels (think of kexec).
> So, a more general solution is needed.
> 
> --
> Thanks,
> //richard

Thanks for your feedback, I agree that these are things that should also be looked at!

-mehaf

^ permalink raw reply

* Re: 2013 Plumber's CFP: Fastboot
From: Jeremiah Foster @ 2013-05-15  9:43 UTC (permalink / raw)
  To: Mehaffey, John
  Cc: mzjro@0pointer.net, systemd-devel@lists.freedesktop.org,
	wd@denx.de, linux-embedded@vger.kernel.org, Kay.Sievers@vrfy.org,
	linux-kernel@vger.kernel.org, u-boot@lists.denx.de,
	tim.bird@am.sony.com, genivi-dev@mail.genivi.org,
	celinux-dev@lists.celinuxforum.org, Pomerantz, Brian,
	yoush@cs.msu.su
In-Reply-To: <371E240E6FC1D44DA5E51EE9DCDCB7845E3D0BF9@NA-MBX-03.mgc.mentorg.com>


[-- Attachment #1.1: Type: text/plain, Size: 1306 bytes --]

On Tue, May 14, 2013 at 1:51 AM, Mehaffey, John <John_Mehaffey@mentor.com>wrote:

> Hello All,
>

Hey John!


> I am proposing a microconference on fastboot at the Linux Plumber's
> conference 2013 in New Orleans. The goal is to get to sub 1S boot times for
> a large (IVI) system using NAND flash. This pushes the state of the art,
> and will require innovative solutions in may areas of Linux plumbing,
> including bootloader, kernel init, UBI, and systemd.
>
> Note that fastboot improvements will (generally) help all architectures so
> I am not limiting this to automotive systems.
>
> Please visit http://wiki.linuxplumbersconf.org/2013:fastboot for more
> information or if you want to submit a topic.
>

I've linked to your micrconference from the automotive microconference:
http://wiki.linuxplumbersconf.org/2013:automotive

I'm a bit confused about the LPC format though. John, is it planned to have
the non-Android fastboot discussion as part of the automotive
microconference or is this separate (despite its automotive relevance.) I
ask because it might be nice to have the participants in both
microconferences and it would be a shame to lose attendees to one or the
other if they're competing tracks.

Can someone clue me in to the microconference format as regards LPC?

Thanks,

Jeremiah

[-- Attachment #1.2: Type: text/html, Size: 2210 bytes --]

[-- Attachment #2: Type: text/plain, Size: 171 bytes --]

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

^ permalink raw reply

* Re: [systemd-devel] 2013 Plumber's CFP: Fastboot
From: Lennart Poettering @ 2013-05-15 12:50 UTC (permalink / raw)
  To: Jeremiah Foster
  Cc: Mehaffey, John, systemd-devel@lists.freedesktop.org, wd@denx.de,
	linux-embedded@vger.kernel.org, Kay.Sievers@vrfy.org,
	linux-kernel@vger.kernel.org, u-boot@lists.denx.de,
	tim.bird@am.sony.com, genivi-dev@mail.genivi.org,
	celinux-dev@lists.celinuxforum.org, Pomerantz, Brian,
	yoush@cs.msu.su
In-Reply-To: <CADVDRBjOX2Jy5t36jwZt9i9OGt3Ca_rBx_FbptYJ34CK2EP+AA@mail.gmail.com>

On Wed, 15.05.13 11:43, Jeremiah Foster (jeremiah.foster@pelagicore.com) wrote:

> On Tue, May 14, 2013 at 1:51 AM, Mehaffey, John <John_Mehaffey@mentor.com>wrote:
> 
> > Hello All,
> >
> 
> Hey John!
> 
> 
> > I am proposing a microconference on fastboot at the Linux Plumber's
> > conference 2013 in New Orleans. The goal is to get to sub 1S boot times for
> > a large (IVI) system using NAND flash. This pushes the state of the art,
> > and will require innovative solutions in may areas of Linux plumbing,
> > including bootloader, kernel init, UBI, and systemd.
> >
> > Note that fastboot improvements will (generally) help all architectures so
> > I am not limiting this to automotive systems.
> >
> > Please visit http://wiki.linuxplumbersconf.org/2013:fastboot for more
> > information or if you want to submit a topic.
> >
> 
> I've linked to your micrconference from the automotive microconference:
> http://wiki.linuxplumbersconf.org/2013:automotive
> 
> I'm a bit confused about the LPC format though. John, is it planned to have
> the non-Android fastboot discussion as part of the automotive
> microconference or is this separate (despite its automotive relevance.) I
> ask because it might be nice to have the participants in both
> microconferences and it would be a shame to lose attendees to one or the
> other if they're competing tracks.
> 
> Can someone clue me in to the microconference format as regards LPC?


BTW, there's also this MC we proposed:

http://wiki.linuxplumbersconf.org/2013:boot_and_core_os

which sounds pretty close to fastboot?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.

^ permalink raw reply

* Re: [systemd-devel] 2013 Plumber's CFP: Fastboot
From: Lucas De Marchi @ 2013-05-15 14:04 UTC (permalink / raw)
  To: Lennart Poettering
  Cc: Jeremiah Foster, Mehaffey, John,
	systemd-devel@lists.freedesktop.org, wd@denx.de,
	linux-embedded@vger.kernel.org, Kay.Sievers@vrfy.org,
	linux-kernel@vger.kernel.org, u-boot@lists.denx.de,
	tim.bird@am.sony.com, genivi-dev@mail.genivi.org,
	celinux-dev@lists.celinuxforum.org, Pomerantz, Brian,
	yoush@cs.msu.su
In-Reply-To: <20130515125048.GC2206@tango.0pointer.de>

On Wed, May 15, 2013 at 9:50 AM, Lennart Poettering
<mzxreary@0pointer.de> wrote:
> On Wed, 15.05.13 11:43, Jeremiah Foster (jeremiah.foster@pelagicore.com) wrote:
>
>> On Tue, May 14, 2013 at 1:51 AM, Mehaffey, John <John_Mehaffey@mentor.com>wrote:
>>
>> > Hello All,
>> >
>>
>> Hey John!
>>
>>
>> > I am proposing a microconference on fastboot at the Linux Plumber's
>> > conference 2013 in New Orleans. The goal is to get to sub 1S boot times for
>> > a large (IVI) system using NAND flash. This pushes the state of the art,
>> > and will require innovative solutions in may areas of Linux plumbing,
>> > including bootloader, kernel init, UBI, and systemd.
>> >
>> > Note that fastboot improvements will (generally) help all architectures so
>> > I am not limiting this to automotive systems.
>> >
>> > Please visit http://wiki.linuxplumbersconf.org/2013:fastboot for more
>> > information or if you want to submit a topic.
>> >
>>
>> I've linked to your micrconference from the automotive microconference:
>> http://wiki.linuxplumbersconf.org/2013:automotive
>>
>> I'm a bit confused about the LPC format though. John, is it planned to have
>> the non-Android fastboot discussion as part of the automotive
>> microconference or is this separate (despite its automotive relevance.) I
>> ask because it might be nice to have the participants in both
>> microconferences and it would be a shame to lose attendees to one or the
>> other if they're competing tracks.
>>
>> Can someone clue me in to the microconference format as regards LPC?
>
>
> BTW, there's also this MC we proposed:
>
> http://wiki.linuxplumbersconf.org/2013:boot_and_core_os
>
> which sounds pretty close to fastboot?
>

What if we merge the proposals?

John, are you ok with proposing (some of) these topics in the "Boot
and Core OS" track? I could help with the module-related part, too.


Lucas De Marchi

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox