All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing)
  2008-07-21 11:26                 ` Jan Kiszka
@ 2008-08-13 11:01                   ` Jan Kiszka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2008-08-13 11:01 UTC (permalink / raw)
  To: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 2497 bytes --]

Jan Kiszka wrote:
> Petr Cervenka wrote:
>> I ran a test during last weekend (and nothing wrong happened). But the /proc/xenomai/stat output is strange. Probably some type cast error, because 18446744071739514846 = 0xFFFFFFFF8A939FDE and the appropriate value perhaps should be 0x000000008A939FDE = 2324930526.
>>
>> CPU  PID    MSW        CSW        PF    STAT       %CPU  NAME
>>   0  0      0          18446744071739514846 0     00500088   69.8  ROOT/0
>>   1  0      0          18446744071675175740 0     00500080   23.2  ROOT/1
>>   0  5299   0          351459     0     00300182    0.0  LOGGER_TASK_1804289383
>>   0  5100   8          283613     0     00300186    0.0
>>   0  5317   0          40591      0     00300182    0.0
>>   0  5034   2          2330696    0     00300184    0.0  MAIN_TASK_2056
>>   0  5318   5          18446744071736105613 3     00300180   29.5  REG_TASK_2056
>>   0  5319   28         36         0     00300182    0.0  WORK_TASK_2056
>>   0  5321   38926      39159      0     00300380    0.0  CERECV_2056
>>   0  5323   1159385    2438330    0     00300181    0.0  CESEND_2056
>>   1  5710   0          18446744071675175740 0     00300184   76.8  HARDWARE_KERNEL
>>   0  0      0          18446744071964064315 0     00000000    0.7  IRQ520: [timer]
>>   1  0      0          232145209  0     00000000    0.0  IRQ520: [timer] 
> 
> OK, at least this bug is a bit easier to fix. Please try this patch
> (which also takes the chance and extends the range of our stat counters
> a bit):
> 
> Index: xenomai/include/nucleus/stat.h
> ===================================================================
> --- xenomai/include/nucleus/stat.h	(Revision 4060)
> +++ xenomai/include/nucleus/stat.h	(Arbeitskopie)
> @@ -84,20 +84,20 @@ do { \
>  
>  
>  typedef struct xnstat_counter {
> -	int counter;
> +	unsigned long counter;
>  } xnstat_counter_t;
>  
> -static inline int xnstat_counter_inc(xnstat_counter_t *c)
> +static inline unsigned long xnstat_counter_inc(xnstat_counter_t *c)
>  {
>  	return c->counter++;
>  }
>  
> -static inline int xnstat_counter_get(xnstat_counter_t *c)
> +static inline unsigned long xnstat_counter_get(xnstat_counter_t *c)
>  {
>  	return c->counter;
>  }
>  
> -static inline void xnstat_counter_set(xnstat_counter_t *c, int value)
> +static inline void xnstat_counter_set(xnstat_counter_t *c, unsigned long value)
>  {
>  	c->counter = value;
>  }

OK to apply those bits?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing)
@ 2008-08-13 15:48 Fillod Stephane
  2008-08-13 17:02 ` Gilles Chanteperdrix
  2008-08-13 17:53 ` Philippe Gerum
  0 siblings, 2 replies; 5+ messages in thread
From: Fillod Stephane @ 2008-08-13 15:48 UTC (permalink / raw)
  To: Jan Kiszka, xenomai-core

Jan Kiszka wrote:
>/proc/xenomai/stat output is strange. Probably some type cast error, 
> because 18446744071739514846 = 0xFFFFFFFF8A939FDE and the appropriate 
> value perhaps should be 0x000000008A939FDE = 2324930526.
[...]

Reminds me that other pending patch for /proc/xenomai/faults:
https://mail.gna.org/public/xenomai-core/2007-12/msg00064.html

-- 
Stephane


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing)
  2008-08-13 15:48 [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Fillod Stephane
@ 2008-08-13 17:02 ` Gilles Chanteperdrix
  2008-08-13 20:50   ` Philippe Gerum
  2008-08-13 17:53 ` Philippe Gerum
  1 sibling, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2008-08-13 17:02 UTC (permalink / raw)
  To: Fillod Stephane; +Cc: Jan Kiszka, xenomai-core

Fillod Stephane wrote:
> Jan Kiszka wrote:
>> /proc/xenomai/stat output is strange. Probably some type cast error, 
>> because 18446744071739514846 = 0xFFFFFFFF8A939FDE and the appropriate 
>> value perhaps should be 0x000000008A939FDE = 2324930526.
> [...]
> 
> Reminds me that other pending patch for /proc/xenomai/faults:
> https://mail.gna.org/public/xenomai-core/2007-12/msg00064.html

december 2007? Oh dear! You should remind us more often when we
forg^H^H^H^H take so much time to include your patches.

-- 
                                                 Gilles.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing)
  2008-08-13 15:48 [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Fillod Stephane
  2008-08-13 17:02 ` Gilles Chanteperdrix
@ 2008-08-13 17:53 ` Philippe Gerum
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2008-08-13 17:53 UTC (permalink / raw)
  To: Fillod Stephane; +Cc: Jan Kiszka, xenomai-core

Fillod Stephane wrote:
> Jan Kiszka wrote:
>> /proc/xenomai/stat output is strange. Probably some type cast error, 
>> because 18446744071739514846 = 0xFFFFFFFF8A939FDE and the appropriate 
>> value perhaps should be 0x000000008A939FDE = 2324930526.
> [...]
> 
> Reminds me that other pending patch for /proc/xenomai/faults:
> https://mail.gna.org/public/xenomai-core/2007-12/msg00064.html
> 

Finally applied, thanks.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing)
  2008-08-13 17:02 ` Gilles Chanteperdrix
@ 2008-08-13 20:50   ` Philippe Gerum
  0 siblings, 0 replies; 5+ messages in thread
From: Philippe Gerum @ 2008-08-13 20:50 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Jan Kiszka, xenomai-core

Gilles Chanteperdrix wrote:
> Fillod Stephane wrote:
>> Jan Kiszka wrote:
>>> /proc/xenomai/stat output is strange. Probably some type cast error, 
>>> because 18446744071739514846 = 0xFFFFFFFF8A939FDE and the appropriate 
>>> value perhaps should be 0x000000008A939FDE = 2324930526.
>> [...]
>>
>> Reminds me that other pending patch for /proc/xenomai/faults:
>> https://mail.gna.org/public/xenomai-core/2007-12/msg00064.html
> 
> december 2007? Oh dear! You should remind us more often when we
> forg^H^H^H^H take so much time to include your patches.
> 

Well, technically, this patch was not forgotten, but was, mmff... "swapped out".
Fact is that my swapper-in sometimes gets swapped out as well. Working on it.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-13 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13 15:48 [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Fillod Stephane
2008-08-13 17:02 ` Gilles Chanteperdrix
2008-08-13 20:50   ` Philippe Gerum
2008-08-13 17:53 ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2008-07-08  9:33 [Xenomai-help] Kernel panic: not syncing Jan Kiszka
2008-07-09 15:19 ` Petr Cervenka
2008-07-09 16:05   ` Philippe Gerum
2008-07-11 13:18     ` Petr Cervenka
2008-07-15 14:42       ` Petr Cervenka
2008-07-15 15:03         ` Jan Kiszka
2008-07-16  8:39           ` Petr Cervenka
2008-07-17 10:21             ` Jan Kiszka
2008-07-21 10:58               ` Petr Cervenka
2008-07-21 11:26                 ` Jan Kiszka
2008-08-13 11:01                   ` [Xenomai-core] [PATCH] Fix stat overruns on 64-bit (was: [Xenomai-help] Kernel panic: not syncing) Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.