Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Oct 2010 10:03:09 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= <des@des.no>, Tijl Coosemans <tijl@coosemans.org>, Oliver Fromme <olli@lurza.secnetix.de>, freebsd-hackers@freebsd.org
Subject:   Re: Summary: Re: Spin down HDD after disk sync or before power off
Message-ID:  <20101022100309.GA16446@freebsd.org>
In-Reply-To: <4CC156F5.1050109@FreeBSD.org>
References:  <201009161742.24228.tijl@coosemans.org> <201009161619.o8GGJAmv035378@lurza.secnetix.de> <20101018155944.GA12425@freebsd.org> <868w1r92rf.fsf@ds4.des.no> <20101021122110.GA65490@freebsd.org> <4CC156F5.1050109@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri Oct 22 10, Alexander Motin wrote:
> Alexander Best wrote:
> > the current implementation (kern.cam.power_down) uses a singe "sleep"
> > operation, whereas the patch by oliver uses "flush" and "standby immediate".
> 
> Sleep is just more aggressive. It puts device into deeper sleep state. I
> don't think it is important from wearing point of view.
> 
> > unfortunately almost nobody was aware of mav's work at the time of the
> > discussion. would have been nice to have a note in cam(4) explaining the
> > purpose of kern.cam.power_down. that way a lot of double work could have been
> > avoided.
> 
> That code was expected to handle spindown on shutdown in unified fashion
> for ATA and SCSI devices without dependency from peripheral driver (even
> without one), just using different commands for each protocol. It works,
> but in current implementation it is unreliable. The problem is that it
> uses polled operation mode, not supported by some controllers or
> unreliable on some (e.g. atapicam). So the code is disabled now by
> default. I haven't yet decided it's future: it should be either reworked
> or reverted.

so how about olivers patch? it will only apply to ata devices so it's
garanteed not to break any other CAM devices (i'm thinking about the aac
controller issue). you could revert your previous shutdown work and plug
olivers patch into CAM. you might want to replace the combination of
flush/standby immediate with sleep.

cheers.
alex

> 
> As positive side -- as soon as CAM is not using NewBus at the moment,
> CAM registers own shutdown handlers. That allows CAM to receive the
> howto argument, which allows to separate cases of reboot and shutdown
> cases just by:
> 	if ((howto & RB_POWEROFF) == 0)
> 
> > is the ATA(4) subsystem still being actively worked on or will it die out after
> > officially switching to ATA_CAM? the question is, if it is worth implementing
> > hdd spin down for ATA(4)?
> 
> I don't think it will be really critical. Next months I am going to work
> on ataraid(4) replacement, which was main declared show stopper for the
> switch. I hope to trash legacy code some time after switching to ATA_CAM
> to clear number of odd things (like almost not working port multipliers
> support or duplicate drivers), required by it.
> 
> -- 
> Alexander Motin

-- 
a13x



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101022100309.GA16446>