Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Hello, Henrique. Henrique de Moraes Holschuh wrote: approximately translates into if you have too many boatmen on a ship, it goes to mountain. We also have a bunch of Toshiba laptops which Yeah, that's a problem. But we can avoid it if we start snooping what ACPI is asking us to deliver

Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Henrique de Moraes Holschuh wrote: On Tue, 07 Aug 2007, Tejun Heo wrote: Henrique de Moraes Holschuh wrote: approximately translates into if you have too many boatmen on a ship, it goes to mountain. We also have a bunch of Toshiba laptops which Yeah, that's a problem. But we can avoid

Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Thomas Renninger wrote: Any chances of changing things so that we inspect/snoop all tasks sent to the device, and filter them out, or react to them accordingly? No, we can't unless we snoop ACPI method execution and detect accesses to IO ports or iomem regions. It's not going through any

Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Thomas Renninger wrote: I'd also suggest adding a FAIL to the Linux firmware toolkit to any DSDT doing this. Who should we prod to add that check? Dunno how the firmware toolkit works but this one can be pretty difficult to test (if it were easy, we could test it in libata) as it involves

Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Robert Hancock wrote: Tejun Heo wrote: Yeah, that seems to be what's going on. I don't think we have any other choice than blacklisting those notebooks. This is a mess. How does the other OS cope with this? Quite possible that it gets a double spindown with these laptop/drive

Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Michael Sedkowski wrote: I did some additional checking today... On kernels prior to 2.6.22 line, the bug exists and manifests itself exactly the same way. However, when I removed the -h flag from /etc/init.d/halt, the drive spins down only once on Power down message and there is no sign of

Re: Disk spin down issue on shut down/suspend to disk

2007-08-07 Thread Tejun Heo
Rafael J. Wysocki wrote: Well, on my box (nx6325) with the appended (experimental) patch applied on top of 2.6.23-rc1 with the patchset from http://www.sisk.pl/kernel/hibernation_and_suspend/2.6.23-rc2/patches/ , the double spin down doesn't occur during hibernation and the system is shut down

Re: [PATCH 01/25] sysfs: Move all of inode initialization into sysfs_init_inode

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:08:07PM -0600, Eric W. Biederman wrote: Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: [PATCH 02/25] sysfs: Remove sysfs_instantiate

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:08:50PM -0600, Eric W. Biederman wrote: Now that sysfs_get_inode is dropping the inode lock we no longer have a need from sysfs_instantiate. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] - To unsubscribe from this list

Re: [PATCH 03/25] sysfs: Use kill_anon_super

2007-08-08 Thread Tejun Heo
to free them. At the moment this is not biting us only because we never unmount sysfs. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL

Re: [PATCH 04/25] sysfs: Make sysfs_mount static

2007-08-08 Thread Tejun Heo
and cleaner code. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 05/25] sysfs: In sysfs_lookup don't open code sysfs_find_dirent

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:12:02PM -0600, Eric W. Biederman wrote: This is a small cleanup patch that makes the code just a little bit cleaner. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line

Re: [PATCH 06/25] sysfs: Simplify readdir.

2007-08-08 Thread Tejun Heo
allows the remove of all of the mysterious checks for sysfs_type(sd) != 0. Which were nonbovious checks to see if a cursor was in a directory list. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send

Re: [PATCH 07/25] sysfs: Rewrite sysfs_drop_dentry.

2007-08-08 Thread Tejun Heo
to play with the sysfs_assoc_lock. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Great, Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http

Re: [PATCH 08/25] sysfs: Implement __sysfs_get_dentry

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:16:19PM -0600, Eric W. Biederman wrote: This function is similar but much simpler to sysfs_get_dentry returns a sysfs dentry if one currently exists. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun

Re: [PATCH 09/25] sysfs: Move sysfs_get_dentry below __sysfs_get_dentry

2007-08-08 Thread Tejun Heo
movement doesn't get confused with later code changes. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: [PATCH 10/25] sysfs: Rewrite sysfs_get_dentry in terms of __sysfs_get_dentry

2007-08-08 Thread Tejun Heo
-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 11/25] sysfs: Remove s_dentry

2007-08-08 Thread Tejun Heo
. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] Nice clean up. Thanks. -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Eric W. Biederman wrote: Cornelia Huck [EMAIL PROTECTED] writes: My udev failed to create /dev/dasd* so it cannot mount root :( I'm currently trying to find out what causes this, may take some time... Oh weird. No great surprise that something goofed up given how many patches were

Re: [PATCH 12/25] sysfs: Introduce sysfs_rename_mutex

2007-08-08 Thread Tejun Heo
Hello, Eric. Eric W. Biederman wrote: Looking carefully at the rename code we have a subtle dependency that the structure of sysfs not change while we are performing a rename. If the parent directory of the object we are renaming changes while the rename is being performed nasty things could

Re: [PATCH 12/25] sysfs: Introduce sysfs_rename_mutex

2007-08-08 Thread Tejun Heo
Tejun Heo wrote: Hello, Eric. Eric W. Biederman wrote: Looking carefully at the rename code we have a subtle dependency that the structure of sysfs not change while we are performing a rename. If the parent directory of the object we are renaming changes while the rename is being

Re: [PATCH 13/25] sysfs: Simply sysfs_get_dentry

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:22:13PM -0600, Eric W. Biederman wrote: Now that we know the sysfs tree structure cannot change under us simplfy sysfs_get_dentry. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] It might be better to have

Re: [PATCH 14/25] sysfs: Don't use lookup_one_len_kern

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:23:57PM -0600, Eric W. Biederman wrote: Upon inspection it appears that there is no looking of the inode mutex in lookup_one_len_kern and we aren't calling it with the inode mutex and that is wrong. So this patch rolls our own dcache insertion function that does

Re: [PATCH 15/25] vfs: Remove lookup_one_len_kern

2007-08-08 Thread Tejun Heo
lookup_one_len_kern(). In that case, I think the previous one is okay too. Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org

Re: [PATCH 17/25] sysfs: Rewrite rename in terms of sysfs dirents

2007-08-08 Thread Tejun Heo
int sysfs_rename_dir(struct kobject * kobj, const char *new_name) { - struct sysfs_dirent *sd; + struct sysfs_dirent *sd = kobj-sd; struct dentry *parent = NULL; struct dentry *old_dentry = NULL, *new_dentry = NULL; const char *dup_name = NULL; @@ -863,42

Re: [PATCH 18/25] sysfs: Rewrite sysfs_move_dir in terms of sysfs dirents

2007-08-08 Thread Tejun Heo
code. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] Signed-off-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Cornelia Huck wrote: On Wed, 08 Aug 2007 01:57:07 -0600, [EMAIL PROTECTED] (Eric W. Biederman) wrote: Got it: It's patch 6, the readdir simplification. (The udev on that guest is ancient (063)...) Ok. That is weird. More weirdness. If I activate another dasd from the repair file

Re: [PATCH 19/25] sysfs: sysfs_get_dentry add a sb parameter

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:29:23PM -0600, Eric W. Biederman wrote: In preparation for multiple mounts of sysfs add a superblock parameter to sysfs_get_dentry. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] @@ -827,7 +829,7 @@ struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd)

Re: [PATCH 20/25] sysfs: Rename Support multiple superblocks

2007-08-08 Thread Tejun Heo
Hello, On Tue, Aug 07, 2007 at 03:31:18PM -0600, Eric W. Biederman wrote: This patch modifies the sysfs_rename_dir and sysfs_move_dir to support multiple sysfs dentry trees rooted in different sysfs superblocks. Signed-off-by: Eric W. Biederman [EMAIL PROTECTED] +struct

Re: [PATCH 21/25] sysfs: sysfs_chmod_file handle multiple superblocks

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:32:46PM -0600, Eric W. Biederman wrote: Teach sysfs_chmod_file how to handle multiple sysfs superblocks. We need to iterate over each superblock so that we give all of the appropriate filesystem modification notifications. Signed-off-by: Eric W. Biederman

Re: [PATCH 22/25] sysfs: sysfs_uptdate_file handle multiple superblocks

2007-08-08 Thread Tejun Heo
On Tue, Aug 07, 2007 at 03:34:11PM -0600, Eric W. Biederman wrote: Teach sysfs_update_file how to handle multiple sysfs superblocks. Again we are just iterating over the superblocks to so all of the filesystem modification notifications work as expected. Signed-off-by: Eric W. Biederman

Re: Disk spin down issue on shut down/suspend to disk

2007-08-08 Thread Tejun Heo
Mark Lord wrote: Tejun Heo wrote: Michael Sedkowski wrote: Dnia 07-08-2007, Wt o godzinie 03:43 +0900, Tejun Heo napisał(a): Does emergency unload count increase after each power down? I think I got it. Using smartctl I've done a test and shut down, then repeted the test. The only values

Re: Disk spin down issue on shut down/suspend to disk

2007-08-08 Thread Tejun Heo
Mark Lord wrote: Heh.. I haven't instrumented it yet, but I did discover a bit more about it: The Power-Off_Retract_Count incrmenents *only* when there's data in the on-drive write-cache. So if I haven't written anything significantly large before suspending, then it often does NOT

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Cornelia Huck wrote: On Wed, 08 Aug 2007 23:35:36 +0900, Tejun Heo [EMAIL PROTECTED] wrote: Does the attached patch happen to fix the problem? Indeed it does; thanks! Yeah, you seem to have 32bit off_t. UINT_MAX overflows, so... -- tejun - To unsubscribe from this list: send the line

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Does the attached patch happen to fix the problem? -- tejun --- fs/sysfs/dir.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: work/fs/sysfs/dir.c === --- work.orig/fs/sysfs/dir.c +++ work/fs/sysfs/dir.c @@

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Eric W. Biederman wrote: Tejun Heo [EMAIL PROTECTED] writes: Cornelia Huck wrote: On Wed, 08 Aug 2007 23:35:36 +0900, Tejun Heo [EMAIL PROTECTED] wrote: Does the attached patch happen to fix the problem? Indeed it does; thanks! Yeah, you seem to have 32bit off_t. UINT_MAX overflows, so

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Tejun Heo wrote: Eric W. Biederman wrote: Tejun Heo [EMAIL PROTECTED] writes: Cornelia Huck wrote: On Wed, 08 Aug 2007 23:35:36 +0900, Tejun Heo [EMAIL PROTECTED] wrote: Does the attached patch happen to fix the problem? Indeed it does; thanks! Yeah, you seem to have 32bit off_t

Re: [PATCH 14/25] sysfs: Don't use lookup_one_len_kern

2007-08-08 Thread Tejun Heo
Eric W. Biederman wrote: right? I don't think we need to duplicate the code here. Or is it needed for later multi-sb thing? Right. We can do that as well. In practice in working code there is no real difference. There is a little extra uniformity in rolling it ourselves, but not

Re: [PATCH 20/25] sysfs: Rename Support multiple superblocks

2007-08-08 Thread Tejun Heo
Eric W. Biederman wrote: Welcome. I will see what I can do with respect to cleaning up the names. As for the return value of sysfs_get_dentry that is tricky. In particular I have three specific cases the code needs to deal with. - We got the dentry. - We did not get the dentry because

Re: [PATCH 0/25] Sysfs cleanups tagged directory support

2007-08-08 Thread Tejun Heo
Hello, Eric W. Biederman wrote: More specifically, d_off field. It's a bit twisted. For the last entry, filp-f_pos gets written into the field and gets wrapped while being copied out to userland or in glibc. That could do it, and glibc is crunching it. Oh well, it is easy enough to

Re: Disk spin down issue on shut down/suspend to disk

2007-08-08 Thread Tejun Heo
Mark Lord wrote: Further to this, if I have an active-writer running at the time of suspend, then even my scripted sleep 1 is not good enough, as additional writes are still happening before/after the flush. Now I'll reboot and try it with the sleep 1 hardcoded inside sd_suspend(). Hmmm...

Re: alternative approached at tagged nodes

2007-08-08 Thread Tejun Heo
Okay, here's a different implementation of tagged nodes. I just compile tested it so I can guarantee it's broken. I don't think there's anything fundamentally wrong but I'm wrong fairly often, so if you find something moronic, feel free to scream at me. 1. there's no enable_tagging() or

Re: [PATCH 20/25] sysfs: Rename Support multiple superblocks

2007-08-08 Thread Tejun Heo
Eric W. Biederman wrote: /* Find the first parent which has valid dentry. */ dentry = NULL; cur = sd; while (!(dentry = __sysfs_get_dentry(sb, cur))) { if (cur-s_flags SYSFS_FLAG_REMOVED) { dentry = ERR_PTR(-ENOENT);

Re: [BUG] The return of the sysfs oops

2007-10-09 Thread Tejun Heo
Chris Rankin wrote: Hi, Do you remember that oops in sysfs a few versions ago? (Kernel bug 8198) Well, it's bck in 2.6.22.9... This isn't really related to sysfs. It seems module count was too low and went away while there still were holders. What were you doing when it happened?

Re: sata_sil24 broken since 2.6.23-rc4-mm1

2007-10-10 Thread Tejun Heo
Torsten Kaiser wrote: Looking closer at http://git.kernel.org/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=commitdiff;h=ec6fdded4d76aa54aa57341e5dfdd61c507b1dcd the change to libata.h seems bogus : in ata_qc_first_sg: oldnew return qc-__sg

Re: sata_sil24 broken since 2.6.23-rc4-mm1

2007-10-11 Thread Tejun Heo
Torsten Kaiser wrote: That missing +1 would explain, why the SGE_TRM never gets set. Thanks a lot for tracking this down. Does changing the above code fix your problem? I did not try it. I'm not an libata expert and while this change looks suspicios, I can't be 100% sure if that change

Re: sata_sil24 broken since 2.6.23-rc4-mm1

2007-10-11 Thread Tejun Heo
Jens Axboe wrote: This is the old ata_sg_is_last: static inline int ata_sg_is_last(struct scatterlist *sg, struct ata_queued_cmd *qc) { if (sg == qc-pad_sgent) return 1; if (qc-pad_len) return 0; if (((sg - qc-__sg) + 1) ==

Re: ATA scsi driver misbehavior under kdump capture kernel

2007-07-30 Thread Tejun Heo
Hello, Cliff. Cliff Wickman wrote: I've run into a problem with the ATA SCSI disk driver when running in a kdump dump-capture kernel. I'm running on 2-processor x86_64 box. It has 2 scsi disks, /dev/sda and /dev/sdb My kernel is 2.6.22, and built to be a dump capturing kernel loaded by

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Jeff Garzik wrote: Any chance the SCSI peeps could ACK this, and then let me include it in the ALPM patchset in the libata tree? ATA link PS is pretty complex with HIPM, DIPM and AHCI ALPM. I'm not sure whether this three level knob would be sufficient. It might be good enough if we're gonna

[PATCH 3/7] sysfs: cosmetic changes in sysfs_lookup()

2007-07-31 Thread Tejun Heo
* remove space between * and symbol name in variable declaration. * kill unnecessary new line. * kill 'found' and test 'sd' instead. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- fs/sysfs/dir.c | 15 +-- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/fs/sysfs

[PATCHSET 2.6.23-rc1] sysfs: locking fix and cleanups

2007-07-31 Thread Tejun Heo
Hello, all. This patchset contains a locking fix and cleanup patches for sysfs. #01 locking fix #02 shadow support removal from Eric adapted to apply after #01 #03-07 clean up patches #01 should go mainline as it fixes a locking regression introduced by -rc1 merge. The rest should

[PATCH 4/7] sysfs: simplify sysfs_remove_dir()

2007-07-31 Thread Tejun Heo
With the shadow directories gone, sysfs_remove_dir() can be simplified. * parent doesn't need to be grabbed separately. Just access old_dentry-d_parent. * parent sd can never change. Remove code to move under the new parent. * Massage comments a bit. Signed-off-by: Tejun Heo [EMAIL

[PATCH 1/7] sysfs: fix locking in sysfs_lookup() and sysfs_rename_dir()

2007-07-31 Thread Tejun Heo
sd children list walking in sysfs_lookup() and sd renaming in sysfs_rename_dir() were left out during i_mutex - sysfs_mutex conversion. Fix them. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- fs/sysfs/dir.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff

[PATCH 6/7] sysfs: make sysfs_add_one() automatically check for duplicate entry

2007-07-31 Thread Tejun Heo
Make sysfs_add_one() check for duplicate entry and return -EEXIST if such entry exists. This simplifies node addition code a bit. This patch doesn't introduce any noticeable behavior change. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- fs/sysfs/dir.c | 25 - fs

[PATCH 5/7] sysfs: make sysfs_add/remove_one() call link/unlink_sibling() implictly

2007-07-31 Thread Tejun Heo
just isn't worth it. Make sysfs_add/remove_one() call sysfs_link/unlink_sibing() implicitly. This makes code simpler albeit slightly less efficient. This change doesn't introduce any noticeable behavior change. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- fs/sysfs/dir.c | 21

[PATCH 7/7] sysfs: make sysfs_addrm_finish() return void

2007-07-31 Thread Tejun Heo
behavior change. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Satyam Sharma [EMAIL PROTECTED] --- fs/sysfs/dir.c |7 +-- fs/sysfs/inode.c |7 +-- fs/sysfs/sysfs.h |2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 69e57be

Re: [PATCH 2/7] sysfs: Remove first pass at shadow directory support

2007-07-31 Thread Tejun Heo
Tejun Heo wrote: While shadow directories appear to be a good idea, the current scheme of controlling their creation and destruction outside of sysfs appears to be a locking and maintenance nightmare in the face of sysfs directories dynamically coming and going. Which can now occur

Re: [PATCH 4/7] sysfs: simplify sysfs_remove_dir()

2007-07-31 Thread Tejun Heo
Cornelia Huck wrote: On Tue, 31 Jul 2007 19:15:08 +0900, Tejun Heo [EMAIL PROTECTED] wrote: With the shadow directories gone, sysfs_remove_dir() can be simplified. * parent doesn't need to be grabbed separately. Just access old_dentry-d_parent. * parent sd can never change. Remove

Re: [PATCHSET 2.6.23-rc1] sysfs: locking fix and cleanups

2007-07-31 Thread Tejun Heo
Cornelia Huck wrote: On Tue, 31 Jul 2007 19:15:08 +0900, Tejun Heo [EMAIL PROTECTED] wrote: Hello, all. This patchset contains a locking fix and cleanup patches for sysfs. #01 locking fix #02 shadow support removal from Eric adapted to apply after #01 #03-07 clean up patches

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Arjan van de Ven wrote: On Tue, 2007-07-31 at 15:27 +0900, Tejun Heo wrote: Jeff Garzik wrote: Any chance the SCSI peeps could ACK this, and then let me include it in the ALPM patchset in the libata tree? ATA link PS is pretty complex with HIPM, DIPM and AHCI ALPM. I'm not sure whether

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Arjan van de Ven wrote: either sucks. AHCI ALPM ought to work if it's supported; it's what other operating systems also use... A question. Does the other OS enable ALPM without checking against white/black list? Or is it enabled only on certain configurations - e.g. specific notebooks, etc?

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Hello, Kristen. Kristen Carlson Accardi wrote: On Tue, 31 Jul 2007 23:45:25 +0900 Tejun Heo [EMAIL PROTECTED] wrote: Anyways, I don't really think this attribute belongs to SCSI sysfs hierarchy. There currently isn't any alternative but sysfs is part of userland visible interface

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Kristen Carlson Accardi wrote: I think what you are saying is that you'd like a way to use your HIPM and DIPM without ALPM on the AHCI driver. Fine - it's really easy to add these levels later - if they don't make sense at the sysfs interface we can add module params to specify the definition

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Arjan van de Ven wrote: They were hardware problems. I don't think any amount of proper implementation can fix them. I have one DVD RAM somewhere in my pile of hardware which locks up solidly if any link PS mode is used and had a and the AHCI ALPM code decides to use power savings on this

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Kristen Carlson Accardi wrote: So at current rate of development and kernel release schedule, the best possible scenario is still 6 months away - whereas this patchset is already tested and ready for merging now. The best possible scenario is .24-rc1 merge window with or without waiting.

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Kristen Carlson Accardi wrote: I don't think the interface you're suggesting is a good one. Do you? I think if it's applicable to SCSI at all it is fine. If it is not, then I think we need to make do with the interface we are given. I do not think we should hold up a feature for libata

Re: IRQ Delivery Problem for MCP65

2007-07-31 Thread Tejun Heo
[cc'ing linux-pci and quoting whole body.] Any ideas? Craig Block wrote: --- Bartlomiej Zolnierkiewicz [EMAIL PROTECTED] wrote: --- Craig Block [EMAIL PROTECTED] wrote: I'm having trouble getting Linux to see any hard drives on an ASUS M2N-X motherboard with an MCP65 (nForce 520)

Re: [patch 3/4] Enable link power management for ata drivers

2007-08-01 Thread Tejun Heo
Kristen Carlson Accardi wrote: libata drivers can define a function (enable_pm) that will perform hardware specific actions to enable whatever power management policy the user set up from the scsi sysfs interface if the driver supports it. This power management policy will be activated

Re: [patch 1/4] Store interrupt value

2007-08-01 Thread Tejun Heo
Kristen Carlson Accardi wrote: Use a stored value for which interrupts to enable. Changing this allows us to selectively turn off certain interrupts later and have them stay off. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun

Re: [patch 2/4] Expose Power Management Policy option to users

2007-08-01 Thread Tejun Heo
Tejun Heo wrote: Arjan van de Ven wrote: They were hardware problems. I don't think any amount of proper implementation can fix them. I have one DVD RAM somewhere in my pile of hardware which locks up solidly if any link PS mode is used and had a and the AHCI ALPM code decides to use power

Re: Can't unload uhci_hcd module with 2.6.22 -- also oops

2007-08-01 Thread Tejun Heo
Hello, Alan. Alan Stern wrote: Tejun: Can you look at this oops message please? It appears similar to the sysfs bug in 2.6.23-rc1, but it occurred under 2.6.22. Is a similar fix needed for the 2.6.22-stable series? 2.6.23-rc1 bug was one too many put during symlink creation failure path

Re: [PATCH 000 of 35] Refactor block layer to improve support for stacked devices.

2007-08-01 Thread Tejun Heo
Avi Kivity wrote: NeilBrown wrote: To achieve this, the for_each macros are now somewhat more complex. For example, rq_for_each_segment is: #define bio_for_each_segment_offset(bv, bio, _i, offs, _size)\ for (_i.i = 0, _i.offset = (bio)-bi_offset + offs,\ _i.size

Re: [PATCH 007 of 35] Drop 'size' argument from bio_endio and bi_end_io.

2007-08-01 Thread Tejun Heo
NeilBrown wrote: As bi_end_io is only called once when the reqeust is compelte, the 'size' argument is now redundant. Remove it. Now there is no need for bio_endio to subtract the size completed from bi_size. So don't do that either. While we are at it, change bi_end_io to return void.

Re: [PATCH 005 of 35] Stop updating bi_idx, bv_len, bv_offset when a request completes

2007-08-01 Thread Tejun Heo
Hello, Went through 1-4 and all look sane and seem to be nice clean ups with or without the rest of series. I didn't really dig into each conversion, so I can't say much about correctness tho. NeilBrown wrote: Some requests signal partial completion. We currently record this by updating

Re: [PATCH 000 of 35] Refactor block layer to improve support for stacked devices.

2007-08-01 Thread Tejun Heo
On Wed, Aug 01, 2007 at 11:52:35AM -0400, John Stoffel wrote: Tejun Avi Kivity wrote: NeilBrown wrote: To achieve this, the for_each macros are now somewhat more complex. For example, rq_for_each_segment is: #define bio_for_each_segment_offset(bv, bio, _i, offs, _size)\ for

Re: [PATCH 019 of 35] Convert bio_for_each_segment to fill in a fresh bio_vec

2007-08-01 Thread Tejun Heo
Hi, On Tue, Jul 31, 2007 at 12:17:27PM +1000, NeilBrown wrote: i.e. instread of providing a pointer to each bio_vec, it provides a copy of each bio_vec. This allows a future patch to cause bio_for_each_segment to provide bio_vecs that are not in the bi_io_vec list, thus allowing for

Re: [PATCH 008 of 35] Introduce bi_iocnt to count requests sharing the one bio.

2007-08-01 Thread Tejun Heo
Hello, On Tue, Jul 31, 2007 at 12:16:29PM +1000, NeilBrown wrote: static int ordered_bio_endio(struct request *rq, struct bio *bio, int error) { struct request_queue *q = rq-q; - bio_end_io_t *endio; - void *private; if (q-bar_rq != rq)

Re: [PATCH 013 of 35] Don't update bi_hw_*_size if we aren't going to merge.

2007-08-01 Thread Tejun Heo
On Tue, Jul 31, 2007 at 12:16:55PM +1000, NeilBrown wrote: ll_merge_requests_fn can update bi_hw_*_size in one case where we end up not merging. This is wrong. Signed-off-by: Neil Brown [EMAIL PROTECTED] As this is a bug fix, I think it would better to bump this to the top of the series

Re: [PATCH 025 of 35] Treat rq-hard_nr_sectors as setting an overriding limit in the size of the request

2007-08-01 Thread Tejun Heo
On Tue, Jul 31, 2007 at 12:17:59PM +1000, NeilBrown wrote: For a request to be able to refer to part of a bio, we need to be able to impose a size limit at the request level. So allow hard_nr_sectors to be less than the size of the bios (and bio_vecs) and interpret it such that anything in

Re: [PATCH 026 of 35] Split any large bios that arrive at __make_request.

2007-08-01 Thread Tejun Heo
Hmmm... Patches don't apply beyond this one. I'm applying against clean 2.6.23-rc1-mm1 grabbed using ketchup. -- tejun - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 026 of 35] Split any large bios that arrive at __make_request.

2007-08-01 Thread Tejun Heo
Neil Brown wrote: On Thursday August 2, [EMAIL PROTECTED] wrote: Hmmm... Patches don't apply beyond this one. I'm applying against clean 2.6.23-rc1-mm1 grabbed using ketchup. So do you mean 027 doesn't apply, or that 028 doesn't apply next? It is possible that you missed 027. It

Re: [patch 3/4] Enable link power management for ata drivers

2007-08-01 Thread Tejun Heo
Kristen Carlson Accardi wrote: On Wed, 01 Aug 2007 17:27:39 +0900 Tejun Heo [EMAIL PROTECTED] wrote: Kristen Carlson Accardi wrote: snippy Is it safe to use ALPM on a device which only claims to support DIPM? Yes - I doubled checked this with the AHCI people - and of course you have

Re: [PATCH 025 of 35] Treat rq-hard_nr_sectors as setting an overriding limit in the size of the request

2007-08-01 Thread Tejun Heo
Neil Brown wrote: On Thursday August 2, [EMAIL PROTECTED] wrote: This is pretty confusing. In all other places, bi_size - #sector conversion is done by rounding down but only in blk_rq_bio_prep() it's being rounded up. Is my following reasoning correct? It was okay till now because

[PATCH 2/5] sysfs: simplify sysfs_rename_dir()

2007-08-02 Thread Tejun Heo
With the shadow directories gone, sysfs_rename_dir() can be simplified. * parent doesn't need to be grabbed separately. Just access old_dentry-d_parent. * parent sd can never change. Remove code to move under the new parent. * Massage comments a bit. Signed-off-by: Tejun Heo [EMAIL

[PATCH 3/5] sysfs: make sysfs_add/remove_one() call link/unlink_sibling() implictly

2007-08-02 Thread Tejun Heo
just isn't worth it. Make sysfs_add/remove_one() call sysfs_link/unlink_sibing() implicitly. This makes code simpler albeit slightly less efficient. This change doesn't introduce any noticeable behavior change. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Acked-by: Cornelia Huck [EMAIL PROTECTED

[PATCHSET 2.6.23-rc1] sysfs: locking fix and cleanups, take #2

2007-08-02 Thread Tejun Heo
Hello, all. This is the second take of sysfs-cleanup patchset. Changes from the last take[L] are... * wrong patch description updated * comment updated * first two patches were accepted into -gregkh and dropped from this series. Thanks. -- tejun [L]

[PATCH 1/5] sysfs: cosmetic changes in sysfs_lookup()

2007-08-02 Thread Tejun Heo
* remove space between * and symbol name in variable declaration. * kill unnecessary new line. * kill 'found' and test 'sd' instead. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Acked-by: Cornelia Huck [EMAIL PROTECTED] --- fs/sysfs/dir.c | 15 +-- 1 files changed, 5 insertions

[PATCH 4/5] sysfs: make sysfs_add_one() automatically check for duplicate entry

2007-08-02 Thread Tejun Heo
Make sysfs_add_one() check for duplicate entry and return -EEXIST if such entry exists. This simplifies node addition code a bit. This patch doesn't introduce any noticeable behavior change. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Acked-by: Cornelia Huck [EMAIL PROTECTED] --- fs/sysfs/dir.c

[PATCH 5/5] sysfs: make sysfs_addrm_finish() return void

2007-08-02 Thread Tejun Heo
behavior change. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc: Satyam Sharma [EMAIL PROTECTED] Acked-by: Cornelia Huck [EMAIL PROTECTED] --- fs/sysfs/dir.c |7 +-- fs/sysfs/inode.c |7 +-- fs/sysfs/sysfs.h |2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fs

Re: [PATCH] sata_qstor, pdc_adma, sata_sx4: convert to new EH

2007-08-02 Thread Tejun Heo
Mark Lord wrote: Jeff Garzik wrote: This is just a refresh of the existing libata-dev.git#new-eh patches that convert all remaining old-EH drivers to new EH, against 2.6.23-rc1. All three conversions are completely untested. pdc_adma and sata_qstor need reviewing by someone with docs, in

Re: ICH8 CF timeout (regression)...

2007-08-02 Thread Tejun Heo
Daniel J Blueman wrote: I'll grab kernel logs from the legacy ATA boot; what else can help debug this issue? No problem testing patches too. Yeap, please post the old log. --- [2] ata2.00: limiting speed to UDMA/33:PIO4 ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen

Re: 2.6.23-rc1-mm2: Fix crash in sysfs_hash_and_remove

2007-08-02 Thread Tejun Heo
Rafael J. Wysocki wrote: From: Rafael J. Wysocki [EMAIL PROTECTED] My test box crashes during suspend, while the nonboot CPUs are being disabled, because sysfs_hash_and_remove() doesn't check if dir_sd passed to it is not NULL. Fix it. Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]

Re: [PATCH] sata_qstor, pdc_adma, sata_sx4: convert to new EH

2007-08-03 Thread Tejun Heo
Jeff Garzik wrote: This is just a refresh of the existing libata-dev.git#new-eh patches that convert all remaining old-EH drivers to new EH, against 2.6.23-rc1. All three conversions are completely untested. pdc_adma and sata_qstor need reviewing by someone with docs, in addition to

Re: ICH8 CF timeout (regression)...

2007-08-03 Thread Tejun Heo
Daniel J Blueman wrote: The ICH8 south-bridge I have is the mobile variant and does come equipped with native parallel IDE - see page 447: http://download.intel.com/design/chipsets/datashts/31305603.pdf . I do see 35MB/s with DMA enabled from my CF on the 1 in 15 times the libata-kernel does

Re: ICH8 CF timeout (regression)...

2007-08-04 Thread Tejun Heo
Daniel J Blueman wrote: Tejun, On 03/08/07, Tejun Heo [EMAIL PROTECTED] wrote: Daniel J Blueman wrote: The ICH8 south-bridge I have is the mobile variant and does come equipped with native parallel IDE - see page 447: http://download.intel.com/design/chipsets/datashts/31305603.pdf . I do

Re: libata git tree, mbox queue status and contents

2007-08-04 Thread Tejun Heo
Alan Cox wrote: * Albert: irq_on/off. Really need to give this some thought. Not sure I like where this model is going. Polling and twiddling irq on/off should be kept to a minimum, because it's sorta an admission that the host state machine has broken down, and we need to bandaid. Its

Re: Nonfunctional ethernet (was Re: 2.6.21-rc7-mm1 + sysfs-oops-workaround.patch -- INFO: possible recursive locking detected)

2007-04-25 Thread Tejun Heo
Hello, Antonino, Andrew. Andrew Morton wrote: On Thu, 26 Apr 2007 09:02:02 +0800 Antonino A. Daplas [EMAIL PROTECTED] wrote: I can bring up the network manually using ifconfig. It's opensuse's rcnetwork script that fails to bring the network up. Entries in /sys/class/net are still bogus.

Re: [DOC] Fix wrong identifier name in Documentation/driver-model/devres.txt

2007-04-26 Thread Tejun Heo
Rolf Eike Beer wrote: Above and below we talk about my_midlayer_create_something, I assume that is also meant here. Signed-off-by: Rolf Eike Beer [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] Thanks. -- tejun - To unsubscribe from this list: send the line unsubscribe linux

[PATCH] sysfs: use different lockdep subclass for s_active deactivation

2007-04-26 Thread Tejun Heo
A sysfs node can delete other sysfs files when accessed. This results in recursive s_active locking - read lock for file access, down lock of the vicitim for deactivation. Tell lockdep that it's okay. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- Miles, please test this patch. It should

Re: [PATCH] sysfs: use different lockdep subclass for s_active deactivation

2007-04-26 Thread Tejun Heo
Miles Lane wrote: On 4/26/07, Tejun Heo [EMAIL PROTECTED] wrote: A sysfs node can delete other sysfs files when accessed. This results in recursive s_active locking - read lock for file access, down lock of the vicitim for deactivation. Tell lockdep that it's okay. Signed-off-by: Tejun Heo

<    4   5   6   7   8   9   10   11   12   13   >