English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 04 January 2018, 11:09   #361
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,512
I remembered (was reminded by seeing something somewhere..) one important CF related feature that can make CF appear slower than normal hard drives. I noticed this when I was working with aca500plus scsi.device optimizations.

For some reason CF cards either don't support PIO multiple transfer mode at all or only up to max 4. (At least I haven't seen larger values)

Multiple transfer mode: number of 512 byte blocks that can be transferred in single pass, without generating interrupt and/or need to wait for data request ready.

Normal A600/A1200/A4000 scsi.device uses multiple transfer up to 16 if drive supports it. (16*512=max 8k can be transferred in single pass without waiting or interrupts)

Low multiple transfer value (or zero) means device driver needs to Wait()'s for interrupt handler to Signal() the task after every 512 bytes (if zero multiple transfer, or 2048 bytes if 4). This can cause very high overhead, especially with CPUs that have no caches or very small instruction cache.

I handled this in aca500plus by disabling IDE interrupts during transfer and when driver was going to wait for interrupt, I chose to simply poll for drive status register until BSY is inactive and DRQ is active. This increased transfer rate (if I remember correctly) almost 1MB/s more in fast 68000 mode.

Interrupt waiting probably also causes slow down even when using non-ssd modern drives because they have huge buffers (vs normal Amiga file size), are internally much faster than Amiga and device waits for first interrupt anyway (send read command, wait for interrupt, transfer all data)

NOTE: this has nothing to do with max transfer.
Toni Wilen is online now  
AdSense AdSense  
Old 04 January 2018, 11:31   #362
dJOS
Registered User

dJOS's Avatar
 
Join Date: Aug 2012
Location: Melbourne, Australia
Posts: 866
I've found the Seagate ST1 microdrive is faster in my Amiga's and had lower CPU overheads, your post might just explain why?

Last edited by dJOS; 05 January 2018 at 07:29.
dJOS is offline  
Old 05 January 2018, 00:46   #363
patrik
Registered User
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 38
Posts: 410
Quote:
Originally Posted by Toni Wilen View Post
Low multiple transfer value (or zero) means device driver needs to Wait()'s for interrupt handler to Signal() the task after every 512 bytes (if zero multiple transfer, or 2048 bytes if 4). This can cause very high overhead, especially with CPUs that have no caches or very small instruction cache.
Is this simply because the amount of code to execute during the interrupt takes a significant time compared to the 512 Bytes transfer itself on a slow cpu?

Can it be checked what number of multiple transfer blocks a card/drive supports software wise?

Quote:
Originally Posted by Toni Wilen View Post
Interrupt waiting probably also causes slow down even when using non-ssd modern drives because they have huge buffers (vs normal Amiga file size), are internally much faster than Amiga and device waits for first interrupt anyway (send read command, wait for interrupt, transfer all data)
Is what you mean that with an old drive, things would not go any faster disregarding method, because the drive will actually take a while to finish a read which is longer than the interrupt processing time, but with a modern drive which often is ready instantly, it you cannot utilize that benefit because scsi.device wastes that time in interrupt processing? And using the above method of polling the status register instead, would read the drive as ready more or less directly with minimal overhead, being able to start the transfer instantly?

Last edited by patrik; 05 January 2018 at 01:37. Reason: More questions
patrik is offline  
Old 05 January 2018, 08:22   #364
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,512
Quote:
Originally Posted by patrik View Post
Is this simply because the amount of code to execute during the interrupt takes a significant time compared to the 512 Bytes transfer itself on a slow cpu?
I'd say it is something from 10% to 30% of time it takes to transfer single block if 68000. But note that ACA500plus scsi.device uses MOVEM loop if 68000 because its data port is designed to be large enough for MOVEM so relative interrupt overhead is larger than standard A600/A1200/A4000 IDE. MOVEM is much more optimal when CPU does not have instruction cache. Normal A600/A1200/A4000 data port width is 2 words only. (Can use MOVE.L to transfer two words with single instruction)

Quote:
Can it be checked what number of multiple transfer blocks a card/drive supports software wise?
Yes but scsi.device does not have any API to query it or execute ATA commands directly.

I have very ugly direct hardware access Amiga executable that returns IDE identity data but it only works with A600/A1200.

Quote:
Is what you mean that with an old drive, things would not go any faster disregarding method, because the drive will actually take a while to finish a read which is longer than the interrupt processing time, but with a modern drive which often is ready instantly, it you cannot utilize that benefit because scsi.device wastes that time in interrupt processing? And using the above method of polling the status register instead, would read the drive as ready more or less directly with minimal overhead, being able to start the transfer instantly?
Yes but time between executing read command and data becoming available afaik is still relatively long even with solid state drives (few hundred microseconds vs milliseconds with platter drives) so initial interrupt waiting probably still makes sense.
Toni Wilen is online now  
Old 05 January 2018, 16:14   #365
Methanoid
Retired Quartex Sysop
Methanoid's Avatar
 
Join Date: Sep 2001
Location: Roman Verulamium
Age: 52
Posts: 1,713
I have both CF and SD adapters and my SD adapter is the latter type that allows SDXC too.

Can I just safely install the SD now
1) in A600 with no SCSI patch
2) using a 3.5+ HDToolbox to format/partition
3) Workbench partition under 2GB and Rest up to 128GB partition sizes
4) using PFS AIO

Nothing else funky to do?
Methanoid is offline  
Old 05 January 2018, 18:11   #366
pgovotsos
Registered User

 
Join Date: Oct 2015
Location: US
Posts: 195
Quote:
Originally Posted by Toni Wilen View Post
I remembered (was reminded by seeing something somewhere..) one important CF related feature that can make CF appear slower than normal hard drives. I noticed this when I was working with aca500plus scsi.device optimizations.

For some reason CF cards either don't support PIO multiple transfer mode at all or only up to max 4. (At least I haven't seen larger values)
That's why I've started using DOMs instead of CF cards. I get much faster transfers for not much more cost and not having to deal with adapters that are sometimes flakey.
pgovotsos is online now  
Old 05 January 2018, 22:55   #367
fgh
Registered User
 
Join Date: Dec 2010
Location: Norway
Posts: 618
Only the older SDHC SD-IDE adapter provides 'illegal' CHS values, the new one requires that you take the same precautions as with a CF or HDD. (scsi.device patch and proper filesystem)

Quote:
Originally Posted by Methanoid View Post
I have both CF and SD adapters and my SD adapter is the latter type that allows SDXC too.

Can I just safely install the SD now
1) in A600 with no SCSI patch
2) using a 3.5+ HDToolbox to format/partition
3) Workbench partition under 2GB and Rest up to 128GB partition sizes
4) using PFS AIO

Nothing else funky to do?
fgh is offline  
Old 07 January 2018, 21:16   #368
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,512
Not mentioned in this FAQ yet and not related related to CF/SD or large drives but it probably is good idea to mention it:

Old and small (max few hundred megabyte) IDE drives that appear as zero size drives in Windows Disk Manager and all normal read attempts return errors. It is now confirmed that the reason is very simple: most (all? Lazy firmware developers..) USB adapters assume LBA support but very old IDE drives are CHS only. LBA was optional in first ATA specs.

Adapter reads drive's identity data and gets max LBA field. CHS only drive's LBA field equals zero..

I managed to find a way to fully image them, confirmed with one LBA-only adapter: http://eab.abime.net/showthread.php?t=87269 post 10+.
Toni Wilen is online now  
Old 08 January 2018, 00:05   #369
patrik
Registered User
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 38
Posts: 410
Quote:
Originally Posted by Toni Wilen View Post
Yes but scsi.device does not have any API to query it or execute ATA commands directly.

I have very ugly direct hardware access Amiga executable that returns IDE identity data but it only works with A600/A1200.
Anything you would be willing to share?
patrik is offline  
Old 08 January 2018, 04:44   #370
dJOS
Registered User

dJOS's Avatar
 
Join Date: Aug 2012
Location: Melbourne, Australia
Posts: 866
Quote:
Originally Posted by dJOS View Post
I've found the Seagate ST1 microdrive is faster in my Amiga's and had lower CPU overheads, your post might just explain why?
Btw, these drives (well the 4GB units I have) have a 4MB Cache which seems to perform exceptionally well.
dJOS is offline  
Old 09 January 2018, 15:09   #371
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,512
Quote:
Originally Posted by Toni Wilen View Post
I have very ugly direct hardware access Amiga executable that returns IDE identity data but it only works with A600/A1200.
http://www.winuae.net/files/b/idequery.zip

Very minimal. A600/A1200 compatible only. Unit 0 only. CLI only. Dumps IDE identity data and shows some extra info.
Toni Wilen is online now  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Large Hard-Drives (over 4gb) keitha1200 support.Hardware 4 20 April 2012 08:09
GVP 4.15 Roms & Large Hard drives... Info-Seeker support.Hardware 21 09 August 2010 12:06
What sort of Filemaster to use with large drives? Ebster support.Apps 4 08 February 2009 17:53
replacing amiga floppy drives with hard drives Gordon support.Hardware 2 06 March 2007 00:44
Large hard drives and WB3.0... darkwave support.Hardware 3 05 July 2004 03:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.09475 seconds with 17 queries