RE: kdump detection in SCSI drivers

2007-09-20 Thread Mukker, Atul
How do we "know" when little memory is available?

Other suggestion which came about was to parse the kernel command line
and look for "elfcorehdr=". Is this ok? Is kernel command line visible
to the SCSI drivers?

Thanks
-Atul

-Original Message-
From: Pavel Machek [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 20, 2007 6:43 AM
To: Mukker, Atul
Cc: Linux-scsi@vger.kernel.org; [EMAIL PROTECTED]
Subject: Re: kdump detection in SCSI drivers

> Hi,
> 
> Is there a standard way for drivers (RAID) to detect if the current
> kernel is running in kdump mode? We would like to adjust driver
behavior
> dynamically when kdump is active by scaling down resources.

Perhaps you should be automatically using little resources when little
memory is available, or something? 

With upcomping kjump patches, it is more "interesting" than kdump
vs. no kdump.

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures)
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kdump detection in SCSI drivers

2007-09-18 Thread Mukker, Atul
Hi,

Is there a standard way for drivers (RAID) to detect if the current
kernel is running in kdump mode? We would like to adjust driver behavior
dynamically when kdump is active by scaling down resources.

Thanks
-Atul Mukker
LSI Corp.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: How to add/drop SCSI drives from within the driver?

2005-01-26 Thread Mukker, Atul
> 
> And what do you mean "different implementations for /sbin/hotplug"?
> What distros do not use the standard "linux-hotplug" type 
> scripts, or if not the scripts, the same functionality?

You are right, even though distributions (I checked Red Hat and SuSE) have
different /sbin/hotplug scripts (e.g., SuSE 9.2 will not execute files from
/etc/hotplug.d whereas Red Hat does) udev will be invoked in all cases,
which will take care of creating device nodes.

But our concern is that how would the applications get the cue that udev has
actually created the nodes for the new devices? 

Make sure an agent is called after the, e.g., scsi agents are executed from
/etc/hotplug directory (which happen to be scsi.agent, scsi_device.agent,
scsi_host.agent in one and only scsi.agent in other distribution), by
writing an rc like script?

Or more likely, by placing our agent in /etc/dev.d directory. Unfortunately,
there seems be not a consensus here as well. On system has "default" and
"net" directories and other has "block", "input", "net", "tty"?


Thanks


Atul Mukker
Architect, RAID Drivers and BIOS
LSI Logic Corporation
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: How to add/drop SCSI drives from within the driver?

2005-01-25 Thread Mukker, Atul
Thanks for the suggestion. After more exploration, looks like different
distribution have different implementations for /sbin/hotplug. This may
aggravate the issue for applications. For now, we will stick with a wait and
watch after bus scan :-(

Will probe the [EMAIL PROTECTED] list for more
pointers

Thanks

===
Atul Mukker
Architect, Drivers and BIOS
LSI Logic Corporation


> -Original Message-
> From: Patrick Mansfield [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 25, 2005 11:52 AM
> To: Mukker, Atul
> Cc: 'James Bottomley'; Linux Kernel; SCSI Mailing List
> Subject: Re: How to add/drop SCSI drives from within the driver?
> 
> Atul -
> 
> On Tue, Jan 25, 2005 at 11:27:36AM -0500, Mukker, Atul wrote:
> > After writing the "- - -" to the scan attribute, the management 
> > applications assume the udev has created the relevant 
> entries in the 
> > /dev directly and try to use the devices _immediately_ and 
> fail to see 
> > the devices
> > 
> > Is there a hotplug event which would tell the management 
> applications 
> > that the device nodes have actually been created now and 
> ready to be used?
> 
> Read the udev man page section, the part right before 
> "FILES". Try putting a script under /etc/dev.d/default/*.dev. 
> Then you can get more specific with an /etc/dev.d/scsi/*.dev 
> script or something else.
> 
> I just tried something simple but did not get it working.
> 
> Try [EMAIL PROTECTED] list for help.
> 
> -- Patrick Mansfield
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: How to add/drop SCSI drives from within the driver?

2005-01-25 Thread Mukker, Atul
> 
> > After the new logical drives are created with "- - -" written to the
> > scsi_host scan attribute, there is a highly noticeable delay before
> device
> > names (e.g., sda) appears in the /dev directory. If the management
> > application tried to access the device immediately after creating new,
> the
> > access fails. Putting a 1 second delay helped, but of course this is not
> a
> > deterministic solution.
> >
> > What are the other possibilities?
> 
> Well, how about hotplug.  The device addition actually triggers a hot
> plug event already (there's no need to add anything, it's done by the
> mid-layer), so if you just listen for that, you'll know when the scan
> has detected a device.


After writing the "- - -" to the scan attribute, the management applications
assume the udev has created the relevant entries in the /dev directly and
try to use the devices _immediately_ and fail to see the devices

Is there a hotplug event which would tell the management applications that
the device nodes have actually been created now and ready to be used?

I tried this simple script to re-create the failure. Assume there is one
scsi disk, which is the installation disk. Now load the megaraid driver,
with a few logical drive already created.

# insmod megaraid_mm.ko; insmod megaraid_mbox.ko; ls -l /dev/sd*




# ls -l /dev/sd*# all devices show up now

Thanks
-Atul
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: How to add/drop SCSI drives from within the driver?

2005-01-21 Thread Mukker, Atul
All right! The implementation is complete for this and the driver has
thoroughly gone through testing. Everything looks good except for a minor
glitch.

After the new logical drives are created with "- - -" written to the
scsi_host scan attribute, there is a highly noticeable delay before device
names (e.g., sda) appears in the /dev directory. If the management
application tried to access the device immediately after creating new, the
access fails. Putting a 1 second delay helped, but of course this is not a
deterministic solution.

What are the other possibilities?

Thanks
-Atul Mukker
LSI Logic

> -Original Message-
> From: James Bottomley [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 15, 2004 1:49 PM
> To: Matt Domsch
> Cc: Salyzyn, Mark; Bagalkote, Sreenivas; [EMAIL PROTECTED]; 
> Linux Kernel; SCSI Mailing List; [EMAIL PROTECTED]; Andrew 
> Morton; Ju, Seokmann; Doelfel, Hardy; Mukker, Atul
> Subject: Re: How to add/drop SCSI drives from within the driver?
> 
> On Wed, 2004-12-15 at 01:24 -0600, Matt Domsch wrote:
> > James, I've been thinking about this a little more, and you 
> may be on 
> > to something here. Let each driver add files as such:
> > 
> > /sys/class/scsi_host
> >  |-- host0
> >  |   |-- add_logical_drive
> >  |   |-- remove_logical_drive
> >  |   `-- rescan_logical_drive
> > 
> > Then we can go 2 ways with this.
> > 1) driver functions directly call scsi_add_device(), 
> > scsi_remove_device(), and something for rescan (option 2 
> handles this 
> > one cleanly for us).  ATM, megaraid_mbox doesn't implement a rescan 
> > function, so this point may be moot.
> > 
> > 2) driver functions call a midlayer library function, which invokes
> >/sbin/hotplug with appropriate data, and add a new /etc/hotplug.d
> >helper app which would then write to these files:
> > 
> > /sys/class/scsi_host
> > |-- host0
> > |   |-- scan
> > /sys/devices/pci:0x/:0x:0x.0/host0
> > |-- 0:0:0:0
> > |   |-- delete
> > |   |-- rescan
> > 
> > to do likewise.
> 
> I'll buy this (option 2).. it seems like a good way to export 
> the megaraid specific information and at the same time 
> integrate it more fully into the evolving hotplug infrastructure.
> 
> James
> 
> 
> -
> 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/
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html