* 2.4.24 extra CPU cycles in scsi.c
@ 2004-02-19 16:18 Richard B. Johnson
2004-04-05 18:37 ` 2.6.5, ACPI, suspend and ThinkPad R40 Biker
0 siblings, 1 reply; 11+ messages in thread
From: Richard B. Johnson @ 2004-02-19 16:18 UTC (permalink / raw)
To: Linux kernel
When looking through various modules that I use, trying to
find out where some memory seems to be leaking, I found a
couple of unrelated things in scsi.c.
The code sets a structure-member to NULL, then releases the
pointer to that structure. A few CPU cycles being thrown away.
Since I was reviewing the whole file, I also got rid of the
spurious casts when calling kfree().
--- linux-2.4.24/drivers/scsi/scsi.c.orig Thu Feb 19 10:45:20 2004
+++ linux-2.4.24/drivers/scsi/scsi.c Thu Feb 19 11:01:47 2004
@@ -314,11 +314,7 @@
void scsi_release_request(Scsi_Request * req)
{
if( req->sr_command != NULL )
- {
scsi_release_command(req->sr_command);
- req->sr_command = NULL;
- }
-
kfree(req);
}
@@ -1449,7 +1445,7 @@
spin_lock_irqsave(&device_request_lock, flags);
for (SCpnt = SDpnt->device_queue; SCpnt; SCpnt = SCnext) {
SDpnt->device_queue = SCnext = SCpnt->next;
- kfree((char *) SCpnt);
+ kfree(SCpnt);
}
SDpnt->has_cmdblocks = 0;
SDpnt->queue_depth = 0;
@@ -1550,7 +1546,7 @@
max_scsi_hosts = n+1;
}
else
- kfree((char *) shn);
+ kfree(shn);
}
}
@@ -1845,7 +1841,7 @@
HBA_ptr->host_queue = scd->next;
}
blk_cleanup_queue(&scd->request_queue);
- kfree((char *) scd);
+ kfree(scd);
} else {
goto out;
}
@@ -2164,7 +2160,7 @@
blk_cleanup_queue(&SDpnt->request_queue);
/* Next free up the Scsi_Device structures for this host */
shpnt->host_queue = SDpnt->next;
- kfree((char *) SDpnt);
+ kfree(SDpnt);
}
}
Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.5, ACPI, suspend and ThinkPad R40
2004-02-19 16:18 2.4.24 extra CPU cycles in scsi.c Richard B. Johnson
@ 2004-04-05 18:37 ` Biker
0 siblings, 0 replies; 11+ messages in thread
From: Biker @ 2004-04-05 18:37 UTC (permalink / raw)
To: linux-kernel
> Hello,
> I have an IBM ThinkPad R40...
Me too,
(model number 2681-BDG) and since the release of 2.6.0 many things have been
sligthly getting worse or never worked at all.
-It used to suspend/resume correctly until 2.6.3, but afterwards reboots
during resume.
-Unplugging a usb bluetooth dongle oopses the machine since 2.6.4 (used to
work ok before).
-The radeon fb drivers both have little problems (garbled screen, last screen
line not updated correctly)...
-The pcmcia controller does not work correctly (it stays dead if a pccard is
plugged in after bootup, I need to restart the pcmcia services to make it
work again).
-I never succeded in making infrared work, however it works fine under 2.4.
I'm very willing to help all the kernel hackers out there to solve these
problems, please contact me, I can run whatever test/patch/hack you might
throw at me.
Regards, Biker.
^ permalink raw reply [flat|nested] 11+ messages in thread
* 2.6.5, ACPI, suspend and ThinkPad R40
@ 2004-04-04 17:36 Olivier Bornet
2004-04-04 22:00 ` Michal Schmidt
0 siblings, 1 reply; 11+ messages in thread
From: Olivier Bornet @ 2004-04-04 17:36 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]
Hello,
I have an IBM ThinkPad R40, with kernel 2.6.5 and ACPI enabled. The
system is a GNU/Debian testing up-to-date, with acpid debian package
1.0.3-2.
I can suspend with Fn-F4, thanks to a acpi config doing:
echo 3 > /proc/acpi/sleep
The laptop goes to sleep as execpted: all the lights goes off, and the
light with the moon goes on. All is OK until this. :-)
The problem is that I can't resume it. I have found no way. Pressing Fn
don't work. The power button don't work. Closing and opening the display
don't work. The only way to re-start the computer is to remove the
battery. Of course, this cause a reboot.
Has anyone some suggestion for me ?
Thanks in advance.
Olivier
--
Olivier Bornet | français : http://puck.ch/f
Swiss Ice Hockey Results | english : http://puck.ch/e
http://puck.ch/ | deutsch : http://puck.ch/g
Olivier.Bornet@puck.ch | italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://pgp.mit.edu/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.5, ACPI, suspend and ThinkPad R40
2004-04-04 17:36 Olivier Bornet
@ 2004-04-04 22:00 ` Michal Schmidt
2004-04-05 22:19 ` Olivier Bornet
0 siblings, 1 reply; 11+ messages in thread
From: Michal Schmidt @ 2004-04-04 22:00 UTC (permalink / raw)
To: Olivier Bornet; +Cc: linux-kernel
Olivier Bornet wrote:
> Hello,
>
> I have an IBM ThinkPad R40, with kernel 2.6.5 and ACPI enabled. The
> system is a GNU/Debian testing up-to-date, with acpid debian package
> 1.0.3-2.
>
I have an R40 too (model 2681-HSG).
> I can suspend with Fn-F4, thanks to a acpi config doing:
>
> echo 3 > /proc/acpi/sleep
>
> The laptop goes to sleep as execpted: all the lights goes off, and the
> light with the moon goes on. All is OK until this. :-)
>
> The problem is that I can't resume it. I have found no way. Pressing Fn
> don't work. The power button don't work. Closing and opening the display
> don't work. The only way to re-start the computer is to remove the
> battery. Of course, this cause a reboot.
>
I had exactly the same problem.
> Has anyone some suggestion for me ?
>
Yes, see:
http://bugzilla.kernel.org/show_bug.cgi?id=1415
There is a patch which worked for me.
> Thanks in advance.
>
> Olivier
Michal Schmidt
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.5, ACPI, suspend and ThinkPad R40
2004-04-04 22:00 ` Michal Schmidt
@ 2004-04-05 22:19 ` Olivier Bornet
2004-04-06 3:28 ` Kevin Fenzi
2004-04-07 7:24 ` Olivier Bornet
0 siblings, 2 replies; 11+ messages in thread
From: Olivier Bornet @ 2004-04-05 22:19 UTC (permalink / raw)
To: Michal Schmidt, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
Hi,
On Mon, Apr 05, 2004 at 12:00:09AM +0200, Michal Schmidt wrote:
> Yes, see:
> http://bugzilla.kernel.org/show_bug.cgi?id=1415
> There is a patch which worked for me.
Thanks a lot. :-) This patch is working as expected for me. Now, after
doing a:
echo LID > /proc/acpi/wakeup_devices
echo SLPB > /proc/acpi/wakeup_devices
I can resume by opening the laptop, or by using the Fn button, or by
using the power button. :-)
This patch seems "very" old (first release 2003-10-28).
Anyone know why this patch is not in the kernel source tree at this
time ?
Good day, and thanks for your help.
Olivier
--
Olivier Bornet | français : http://puck.ch/f
Swiss Ice Hockey Results | english : http://puck.ch/e
http://puck.ch/ | deutsch : http://puck.ch/g
Olivier.Bornet@puck.ch | italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://pgp.mit.edu/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.5, ACPI, suspend and ThinkPad R40
2004-04-05 22:19 ` Olivier Bornet
@ 2004-04-06 3:28 ` Kevin Fenzi
2004-04-07 7:24 ` Olivier Bornet
1 sibling, 0 replies; 11+ messages in thread
From: Kevin Fenzi @ 2004-04-06 3:28 UTC (permalink / raw)
To: linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Olivier" == Olivier Bornet <Olivier.Bornet@puck.ch> writes:
Olivier> Hi,
Olivier> On Mon, Apr 05, 2004 at 12:00:09AM +0200, Michal Schmidt wrote:
>> Yes, see: http://bugzilla.kernel.org/show_bug.cgi?id=1415 There is
>> a patch which worked for me.
Olivier> Thanks a lot. :-) This patch is working as expected for
Olivier> me. Now, after doing a:
Olivier> echo LID > /proc/acpi/wakeup_devices echo SLPB >
Olivier> /proc/acpi/wakeup_devices
Olivier> I can resume by opening the laptop, or by using the Fn
Olivier> button, or by using the power button. :-)
Alas, I would like to report it doesn't work for me.
My laptop suspends, but never comes back from suspend as well.
It doesn't seem like the LID or power buttons are a possible setting
for me. Doing a 'cat /proc/acpi/wakeup_devices' gives:
Device Speep state Status
C04E 5 disabled
C0A0 3 disabled
C0A6 3 disabled
C0A9 3 disabled
C161 3 disabled
C162 3 disabled
C177 4 disabled
C11E 4 disabled
C11E is my suspend button, but it doesn't seem like it will allow S3?
I have no idea what the other addresses are. I tried enabling them
all, and got a big pile of oopses (which I can duplicate if anyone
wants)
Any ideas?
Olivier> This patch seems "very" old (first release 2003-10-28).
Olivier> Anyone know why this patch is not in the kernel source tree
Olivier> at this time ?
Yeah, if it helps some people then it should go in I would think.
It would be nice if we could just set the list of wakeup devices to a
sane list for everyone tho. Power/lid/suspend button.
Back to using nigels swsusp2... at least it's quite fast and the
latest one seems pretty stable with 2.6 for me at least. ;)
kevin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFAciPl3imCezTjY0ERApkWAJ4xZFmTDgXsq7cvrXOQ/HR70Fs5PQCeJshD
uc1kiMwhqGUhn0fDD7FDHko=
=E51X
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 2.6.5, ACPI, suspend and ThinkPad R40
2004-04-05 22:19 ` Olivier Bornet
2004-04-06 3:28 ` Kevin Fenzi
@ 2004-04-07 7:24 ` Olivier Bornet
1 sibling, 0 replies; 11+ messages in thread
From: Olivier Bornet @ 2004-04-07 7:24 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
Hello,
On Tue, Apr 06, 2004 at 12:19:40AM +0200, Olivier Bornet wrote:
> On Mon, Apr 05, 2004 at 12:00:09AM +0200, Michal Schmidt wrote:
> > Yes, see:
> > http://bugzilla.kernel.org/show_bug.cgi?id=1415
> > There is a patch which worked for me.
>
> Thanks a lot. :-) This patch is working as expected for me.
A correction: I can now suspend to ram and resume. But it seems that the
laptop is not in a good state after suspend to ram. I have let it in
this mode the whole day, and when I was back at home, the battery was
empty. :-(
I don't have use this laptop (or even another one) with another
configuration for suspending to ram, so I don't realy know how much time
we can have it in the suspend to ram state before the battery is empty.
But talking with one friend, he say that with 2.4 kernel and APM, this
will be many weeks.
I'm ready to help with the ACPI stuff if this may be usefull. Just let
me know what I can test.
Good day, and thanks for your help.
Olivier
--
Olivier Bornet | français : http://puck.ch/f
Swiss Ice Hockey Results | english : http://puck.ch/e
http://puck.ch/ | deutsch : http://puck.ch/g
Olivier.Bornet@puck.ch | italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://pgp.mit.edu/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <1HjUX-5pa-3@gated-at.bofh.it>]
* RE: 2.6.5, ACPI, suspend and ThinkPad R40
@ 2004-04-06 22:53 Brown, Len
0 siblings, 0 replies; 11+ messages in thread
From: Brown, Len @ 2004-04-06 22:53 UTC (permalink / raw)
To: Theodore Ts'o, Vincent C Jones; +Cc: kevin, linux-kernel
>> lack of interest in supporting notebook features
I'm glad that you're complaining about suspend/resume not working.
This means that you were able to boot and configure your system
using ACPI -- a year ago you wouldn't have got so far;-)
Yes, in the past year we've concentrated more on the configuration
issues at the expense of advanced features such as suspend/resume.
While we still have configuration issues, their frequency and
severity is lower than it once was, and so I'm hopeful that
we're over the hump there and will be able to
spend more time on features such as supsend/resume.
When I looked at a suspend/resume failure a couple of weeks ago
I discovered that there is no code in linux to save/restore
PCI configuration space for PCI bridges. This is sort of a deal
killer -- as bits such as bus-master-enable could come up
enabled or disabled depending on the roll of the dice.
I hoped somebody on linux-pci would send a patch, but I haven't
seen one yet.
Cheers,
-Len
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-04-19 11:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-19 16:18 2.4.24 extra CPU cycles in scsi.c Richard B. Johnson
2004-04-05 18:37 ` 2.6.5, ACPI, suspend and ThinkPad R40 Biker
2004-04-04 17:36 Olivier Bornet
2004-04-04 22:00 ` Michal Schmidt
2004-04-05 22:19 ` Olivier Bornet
2004-04-06 3:28 ` Kevin Fenzi
2004-04-07 7:24 ` Olivier Bornet
[not found] <1HjUX-5pa-3@gated-at.bofh.it>
[not found] ` <1HnYA-hr-9@gated-at.bofh.it>
[not found] ` <1HKVd-1Uf-3@gated-at.bofh.it>
[not found] ` <1HPBr-5yC-5@gated-at.bofh.it>
2004-04-06 13:16 ` Vincent C Jones
2004-04-06 18:20 ` Theodore Ts'o
2004-04-19 6:23 ` Charles Bueche
2004-04-06 22:53 Brown, Len
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).