Um.... okay... I guess that's a problem.
Not that I would recommend swapping over USB anyway....
Suggestions for how to fix it?
Matt
On Sat, Sep 15, 2001 at 12:42:57AM +0200, Pavel Machek wrote:
> Hi!
>
> In usb_stor_control_msg, you are allocating memory with
> GFP_KERNEL. That means that usb-storage devices are not suitable for
> swapping :-(.
>
> Try running eat_memory(); free_memory();. That should not hurt on
> normal system. It kills me while swapping over usb-storage :-(.
>
> /*
> * Perform simple memory check
> */
>
> static void **eaten_memory;
>
> static void eat_memory(void)
> {
> int i = 0;
> void **c= eaten_memory, *m;
>
> printk("Eating pages ");
> while ((m = get_free_page(GFP_KERNEL))) {
> memset(m, 0, PAGE_SIZE);
> eaten_memory = m;
> if (!(i%5000))
> printk( "." );
> *eaten_memory = c;
> c = eaten_memory;
> i++;
> }
> printk("(%dK)\n", i*4);
> }
>
> static void free_memory(void)
> {
> int i = 0;
> void **c = eaten_memory, *f;
>
> printk( "Freeing pages " );
> while (c) {
> if (!(i%5000))
> printk( "." );
> f = *c;
> c = *c;
> if (f) { free_page( f ); i++; }
> }
> printk( "(%dK)\n", i*4 );
> eaten_memory = NULL;
> }
>
> Pavel
> --
> I'm [EMAIL PROTECTED] "In my country we have almost anarchy and I don't care."
> Panos Katsaloulis describing me w.r.t. patents at [EMAIL PROTECTED]
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
Department of Justice agent. I have come to purify the flock.
-- DOJ agent
User Friendly, 5/22/1998
PGP signature