Re: [PATCH] m68k/atari - ide: do not register interrupt if host->get_lock is set

2014-01-30 Thread Michael Schmitz
Geert,

On Fri, Jan 31, 2014 at 4:03 AM, Geert Uytterhoeven
 wrote:
> On Tue, Jan 28, 2014 at 9:07 AM, Michael Schmitz  wrote:
>> --- a/drivers/ide/ide-probe.c
>> +++ b/drivers/ide/ide-probe.c
>> @@ -853,8 +853,9 @@ static int init_irq (ide_hwif_t *hwif)
>> if (irq_handler == NULL)
>> irq_handler = ide_intr;
>>
>> -   if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
>> -   goto out_up;
>> +   if (!host->get_lock)
>> +   if (request_irq(hwif->irq, irq_handler, sa, hwif->name, 
>> hwif))
>> +   goto out_up;
>
> Don't you need a similar check for free_irq()?

Absolutely. Thanks for spotting this. I'll send the fixed version to linux-ide.

Cheers,

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


Re: [PATCH] m68k/atari - ide: do not register interrupt if host->get_lock is set

2014-01-30 Thread Geert Uytterhoeven
On Tue, Jan 28, 2014 at 9:07 AM, Michael Schmitz  wrote:
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
> @@ -853,8 +853,9 @@ static int init_irq (ide_hwif_t *hwif)
> if (irq_handler == NULL)
> irq_handler = ide_intr;
>
> -   if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
> -   goto out_up;
> +   if (!host->get_lock)
> +   if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
> +   goto out_up;

Don't you need a similar check for free_irq()?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH, RFC 02/30] scsi: atari_scsi: fix sleep_on race

2014-01-30 Thread Geert Uytterhoeven
On Thu, Jan 30, 2014 at 9:08 AM, schmitz
 wrote:
>>> While working on the driver, I noticed my Falcon ran into a memory
>>> squeeze
>>> once a day, resulting in oom-killing processes and rendering the system
>>> unusable. Most likely culprit to trigger this is the daily updatedb run.
>>> This sort of trouble started pretty much with my work on the SCSI driver,
>>> based on commit aa5311c454ed0ff959adca29c65be2157f52a84c (3.13-rc7). Do
>>> you
>>> know of any memory leak affecting m68k, introduced between last November
>>> and
>>> 3.13-rc7?
>>
>> How much RAM and swap do you have?
>
> 14 MB ST-RAM, 512 MB FastRAM, 2GB swap.
>
>> Modern kernels just require more memory...
>
> Surely not that much more, I hope?

512 MB should be plenty ;-)
My poor m68k box has 500 MB less...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH, RFC 02/30] scsi: atari_scsi: fix sleep_on race

2014-01-30 Thread schmitz

Hi Geert,

While working on the driver, I noticed my Falcon ran into a memory squeeze
once a day, resulting in oom-killing processes and rendering the system
unusable. Most likely culprit to trigger this is the daily updatedb run.
This sort of trouble started pretty much with my work on the SCSI driver,
based on commit aa5311c454ed0ff959adca29c65be2157f52a84c (3.13-rc7). Do you
know of any memory leak affecting m68k, introduced between last November and
3.13-rc7?



How much RAM and swap do you have?
  


14 MB ST-RAM, 512 MB FastRAM, 2GB swap.


Modern kernels just require more memory...
  

Surely not that much more, I hope?

Cheers,

   Michael


  


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


Re: [PATCH, RFC 02/30] scsi: atari_scsi: fix sleep_on race

2014-01-30 Thread schmitz

Hi Geert,



While working on the driver, I noticed my Falcon ran into a memory 
squeeze once a day, resulting in oom-killing processes and rendering 
the system unusable. Most likely culprit to trigger this is the daily 
updatedb run. This sort of trouble started pretty much with my work on 
the SCSI driver, based on commit 
aa5311c454ed0ff959adca29c65be2157f52a84c (3.13-rc7). Do you know of 
any memory leak affecting m68k, introduced between last November and 
3.13-rc7?


Looks like Arnd's patch is not to blame, as I get a memory leak without 
it as well.


Straight after boot:
schmitz@hobbes:~$ cat /proc/interrupts
13: 316007 atari  timer
15:   2151 atari  ST-DMA floppy,ACSI,IDE,Falcon-SCSI, ide0
schmitz@hobbes:~$ free
total   used   free sharedbuffers cached
Mem:526996  41928 485068  0   1944   9548
-/+ buffers/cache:  30436 496560

One day with no significant activity:
13:8895122 atari  timer
15:  17483 atari  ST-DMA floppy,ACSI,IDE,Falcon-SCSI, ide0
Mem:526996  83616 443380  0  17324  12732
-/+ buffers/cache:  53560 473436

Two days ...
13:   17385461 atari  timer
15:  31264 atari  ST-DMA floppy,ACSI,IDE,Falcon-SCSI, ide0
Mem:526996  99528 427468  0  25136  12780
-/+ buffers/cache:  61612 465384

I'll try and go backwards to see when this all started. I switched 
toolchains in December, but that should not cause such behaviour, I 
suppose?


Cheers,

   Michael



Cheers,

   Michael

Arnd,

your patch breaks the Atari NCR5380 SCSI driver (easily verified 
using ARAnyM). Last console output:





Thanks so much for testing and sorry for your troubles. It seems I
got the wrong polarity on at least one of the conditions when converting
from a while()-style loop to an until()-style wait_event loop.
I did double-check all the patches before, but this one must have
slipped through because the use is so obscure.

Arnd

  


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


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