Skip to contentSkip to conversation

I request inclusion of SAS Transport Layer and AIC-94xx into the kernel

RFC PATCH In review Luben Tuikov 65 participants 285 messages Sep 26, 2005 – Dec 8, 2005 3 messages not in the archive Page 1 of 2

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi everyone,

I request inclusion of the SAS Transport Layer and the AIC-94xx SAS LLDD into the Linux kernel.

Please find the latest Linus' git tree with SAS Transport Layer and AIC-94xx, patches and
a whole tar.bz2 tree here:

http://linux.adaptec.com/sas/

There you will also find the original announcements posted to this list.

The code is updated twice daily or more often as needed.

Thank you,
Luben

#1 lore raw
Quoted 2 lines · Luben Tuikov

I request inclusion of the SAS Transport Layer
and the AIC-94xx SAS LLDD into the Linux kernel.

Overall, I see the following major issues. My recommendation is that this driver live in -mm, or outside the kernel tree, for a while to let things shake out.

Background
----------
* There is no question that Adaptec's aic94xx and SAS code is correct WRT the SCSI specifications. The maintainer eats, sleeps, and breathes SAS specs. :)

* aic94xx hardware supports both SAS and SATA connections. Since SAS and SATA are intentionally similar electrically, other vendors are coming out with SATA+SAS hardware too.

* Acronym: "HCIL" Stands for Host/Channel/ID/LUN. Pre-SAS legacy addressing method.

Issues
------
* Avoids existing SAS code, rather than working with it.

* Avoids existing SATA code, rather than working with it.

* Avoids (rather than fix) several SCSI core false dependencies on HCIL. Results in code duplication and/or avoidance of needed code.

* So far, it's an Adaptec-only solution. Since it pointedly avoids the existing SAS transport code, this results in two SAS solutions in Linux: one for Adaptec, one for {everyone else}.

* Maintainer reminds me of my ATA mentor, Andre Hedrick: knows his shit, but has difficulties working with the community. May need a filter if we want long term maintenance to continue.

Resolution
----------
AFAICS, there are two paths:

Easy path: make Adaptec's solution a block driver, which allows it to sidestep all the "doesn't play well with others" issues. Still an Adaptec-only solution, but at least its in a separate playpen.

Hard path: Update the SCSI core and libata to work with SATA+SAS hardware such as Adaptec's.

The hard path takes time, and won't be solved simply by shoving it in.

Jeff

#2 lore raw
Quoted 1 line · Jeff Garzik

* Avoids existing SAS code, rather than working with it.

No, it's the _other_ way around. There is NO existing SAS code.

My SAS code has been around _long_ before Christophs code.

Christoph's code is
* MPT based only,
* doesn't follow a spec to save its life,
* far inferior in SAS capabilities and SAS representation again, due to the fact that it is MPT based.

Since the whole point of MPT is to _hide_ the transport.

Quoted 1 line

* Avoids existing SATA code, rather than working with it.

FUD! Why? It does _not_ use SATA code at all.

Why? SATA devices are discovered on the domain, but there is _no_ SATL in the kernel to represent them.

And libata is _not_ SATL. The reasons are that
libata is closely coupled to the hardware, i.e.
ata_port.

While in SAS open transport architecures, you'd have execute ATA/SAS/SMP task just as you have in aic-94xx. Why? Because all the chip is, is an interface to the interconect.

But I'm sure you know all this having looked at the specs of BCM8603.

Quoted 2 lines

* Avoids (rather than fix) several SCSI core false dependencies on HCIL. Results in code duplication and/or avoidance of needed code.

No, not true. It _integrates_ with SCSI Core. The sad truth is that SCSI Core knows only HCIL.

Jeff, please be more specific.

Quoted 3 lines

* So far, it's an Adaptec-only solution. Since it pointedly avoids the existing SAS transport code, this results in two SAS solutions in Linux:
one for Adaptec, one for {everyone else}.

Hmm, again: _architecture_. And you have to stop these
accusations: "pointedly avoids the existing SAS transport code".

I repeat again that I had this code _long_ before Christoph ever dreamt up SAS. And he got my code via James B sometime before OLS this year. I think he got it July 12, 2005.

The question is: why didn't _he_ use the solution already available?

You have to understand the differences between MPT and open transport architecture.

At some point I thought Christoph seemed to have understood it. Now I'm not sure any more.

Now since the open transport solution completely encompasses and _absolves_ MPT, it is not hard for an MPT driver to generate a bunch of events and use that infrastructure.

Quoted 3 lines

* Maintainer reminds me of my ATA mentor, Andre Hedrick: knows his shit, but has difficulties working with the community. May need a filter if we want long term maintenance to continue.

I take offence in your liking me to Andre -- I don't know Andre personally, but is seems that you're expressing personal opinion against him, against me and labeling me in some way.

I take offence in that, Jeff.

Why are you making this a _political_ and personal game?

All you're doing is trying to aliken me to someone and brandish me as someone I'm not.

This is rude, offensive and done in desperation.

Shall we concentrate on the _technical_ part of
the argument?

I repeat again: _technical_ part of the argument.

Quoted 2 lines

Easy path: make Adaptec's solution a block driver, which allows it to sidestep all the "doesn't play well with others" issues. Still an

What _exactly_ does it mean "don't play well with others"?

Do you mean:
- the solution is far superiour to anything available now
- it presents the SAS Domain in sysfs as it looks in the physical world,
- does domain discovery and expander configuration,
- allows for complete control of the domain to user space,
- it pokes at SCSI Core's 20 year old relics.
- it's a thorn in the flesh to other people striving for similar functionality.

Or do you mean:
- it does not change a single line of code in the kernel,
- does not break anything existing,
- etc, etc.

Quoted 1 line

Adaptec-only solution, but at least its in a separate playpen.

I'm sure James Bottomley will move from SCSI Core to the block layer as he did for IDR. hehehe :-)

And no, it is not Adaptec's only solution. Your BCM8603 SAS LLDD when you write it could use it without any problems.

Quoted 2 lines

Hard path: Update the SCSI core and libata to work with SATA+SAS hardware such as Adaptec's.

Cannot do for libata -- ever. Why? You know best: because libata uses direct access to the hardware! There is no layered architecture.

What you need to do is to write a SATL layer, just as you can see in SAT-r6, page 2, Figure 3. I'm on top of this already.

But in order to do this you need a unified architecture for accessing ATA devices.

Now libata, uses ata_port to do this, which is _hardware_ access.

The SAS Transport layer uses Execute SCSI RPC (defined in SAM, provided by aic94xx) to do this.

So in effect, what SATL would end up to be is a
data transformation function. But I digress...

Quoted 1 line

The hard path takes time, and won't be solved simply by shoving it in.

No, you can do it now. It will not affect anyone or anything. (Other than hurting a couple of people's pride.)

The code doesn't alter Linux SCSI or anyone else's behaviour. It only _provides_ SAS support to the kernel.

Including it in as is would does not hurt anyone as you can see here:
http://linux.adaptec.com/sas/git/

Concentrate on the _technical_ merit, let's be more specific.

Luben

#3 lore raw

Luben,

Welcome to the club ...

You have managed to prove your knowledge base and forgot everything learned in kindergarden. Since I have kids, and spent time back in kindergarden, there are some valuable lessons there many have forgotten.

Quoted 3 lines

From what I have seen here, both sides have some valid points.

From what I know from history and why I no longer maintain anything,

(working to get sanity back) is the Maintainer defines direction while following a bigger picture.

The issues wrt to HCIL v/s WWN v/s Multiplier v/s Target-Mode v/s blahblah blahblah are important questions.

Remember, everything about storage is a lie.

Help create a better lie by mapping into the design set forward by James and company. If the goal of Adaptec is to have support then they need to buckup and play be to rules at hand. Remember, most people are open to new ideas and better models. Propose one and you will find backing.

Since you are in the bay-area ... want to met who you have been associated with ... or is the idea to weird?

Cheers,

Andre

Quoted 162 lines · Luben Tuikov
Quoted 1 line · Jeff Garzik

* Avoids existing SAS code, rather than working with it.

No, it's the _other_ way around. There is NO existing SAS code.

My SAS code has been around _long_ before Christophs code.

Christoph's code is
* MPT based only,
* doesn't follow a spec to save its life,
* far inferior in SAS capabilities and SAS representation again, due to the fact that it is MPT based.

Since the whole point of MPT is to _hide_ the transport.

Quoted 1 line

* Avoids existing SATA code, rather than working with it.

FUD! Why? It does _not_ use SATA code at all.

Why? SATA devices are discovered on the domain, but there is _no_ SATL in the kernel to represent them.

And libata is _not_ SATL. The reasons are that
libata is closely coupled to the hardware, i.e.
ata_port.

While in SAS open transport architecures, you'd have execute ATA/SAS/SMP task just as you have in aic-94xx. Why? Because all the chip is, is an interface to the interconect.

But I'm sure you know all this having looked at the specs of BCM8603.

Quoted 2 lines

* Avoids (rather than fix) several SCSI core false dependencies on HCIL. Results in code duplication and/or avoidance of needed code.

No, not true. It _integrates_ with SCSI Core. The sad truth is that SCSI Core knows only HCIL.

Jeff, please be more specific.

Quoted 3 lines

* So far, it's an Adaptec-only solution. Since it pointedly avoids the existing SAS transport code, this results in two SAS solutions in Linux:
one for Adaptec, one for {everyone else}.

Hmm, again: _architecture_. And you have to stop these
accusations: "pointedly avoids the existing SAS transport code".

I repeat again that I had this code _long_ before Christoph ever dreamt up SAS. And he got my code via James B sometime before OLS this year. I think he got it July 12, 2005.

The question is: why didn't _he_ use the solution already available?

You have to understand the differences between MPT and open transport architecture.

At some point I thought Christoph seemed to have understood it. Now I'm not sure any more.

Now since the open transport solution completely encompasses and _absolves_ MPT, it is not hard for an MPT driver to generate a bunch of events and use that infrastructure.

Quoted 3 lines

* Maintainer reminds me of my ATA mentor, Andre Hedrick: knows his shit, but has difficulties working with the community. May need a filter if we want long term maintenance to continue.

I take offence in your liking me to Andre -- I don't know Andre personally, but is seems that you're expressing personal opinion against him, against me and labeling me in some way.

I take offence in that, Jeff.

Why are you making this a _political_ and personal game?

All you're doing is trying to aliken me to someone and brandish me as someone I'm not.

This is rude, offensive and done in desperation.

Shall we concentrate on the _technical_ part of
the argument?

I repeat again: _technical_ part of the argument.

Quoted 2 lines

Easy path: make Adaptec's solution a block driver, which allows it to sidestep all the "doesn't play well with others" issues. Still an

What _exactly_ does it mean "don't play well with others"?

Do you mean:
- the solution is far superiour to anything available now
- it presents the SAS Domain in sysfs as it looks in the physical world,
- does domain discovery and expander configuration,
- allows for complete control of the domain to user space,
- it pokes at SCSI Core's 20 year old relics.
- it's a thorn in the flesh to other people striving for similar functionality.

Or do you mean:
- it does not change a single line of code in the kernel,
- does not break anything existing,
- etc, etc.

Quoted 1 line

Adaptec-only solution, but at least its in a separate playpen.

I'm sure James Bottomley will move from SCSI Core to the block layer as he did for IDR. hehehe :-)

And no, it is not Adaptec's only solution. Your BCM8603 SAS LLDD when you write it could use it without any problems.

Quoted 2 lines

Hard path: Update the SCSI core and libata to work with SATA+SAS hardware such as Adaptec's.

Cannot do for libata -- ever. Why? You know best: because libata uses direct access to the hardware! There is no layered architecture.

What you need to do is to write a SATL layer, just as you can see in SAT-r6, page 2, Figure 3. I'm on top of this already.

But in order to do this you need a unified architecture for accessing ATA devices.

Now libata, uses ata_port to do this, which is _hardware_ access.

The SAS Transport layer uses Execute SCSI RPC (defined in SAM, provided by aic94xx) to do this.

So in effect, what SATL would end up to be is a
data transformation function. But I digress...

Quoted 1 line

The hard path takes time, and won't be solved simply by shoving it in.

No, you can do it now. It will not affect anyone or anything. (Other than hurting a couple of people's pride.)

The code doesn't alter Linux SCSI or anyone else's behaviour. It only _provides_ SAS support to the kernel.

Including it in as is would does not hurt anyone as you can see here:
http://linux.adaptec.com/sas/git/

Concentrate on the _technical_ merit, let's be more specific.

Luben

-
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/

#4 lore raw

Hi Andre,

Quoted 3 lines · --- Andre Hedrick

From what I know from history and why I no longer maintain anything, (working to get sanity back) is the Maintainer defines direction while following a bigger picture.

Yes, and I think you'll agree with me, the Maintainer isn't/shouldn't necessarily be the person "defining direction". The reasons are many but mostly:
* Documentation/ManagingStyle document (valuable read),
That document _really_ says it _all_. I suggest all developers, maintainers, and corporate _management_ reading this thread to read it.

Why should the Maintainer be "defining direction"? Is this some religous cult where "Beaver knows best?" (punt intended!) Or is this a theocratic society here at Linux SCSI? "Pi = 3" ;-)

The maintainership role is and has been _clearly_ defined! For the sake of eveyone else, take a look at 2.4 maintainer, 2.6 maintainer, other subsystem maintainers: defined by example and in word. So much unlike SCSI Core.

Another also great reason is:
* Complete, utter and infinite _incompetence_ coupled with too much pride.
It hurts us all.

When it comes down to it SCSI Core is 20 years behind and thus Linux Storage is 20 years behind.

Quoted 2 lines

Help create a better lie by mapping into the design set forward by James and company. If the goal of Adaptec is to have support then they need to

Yes, this is indeed a very valuable advice. I hadn't ever looked at it like that.

What I thought, albeit erroneously, mea culpa, is that Linux actually _wanted_ to be "the storage OS of choice". Now I see and realize that due to neglected management, Linux has very little to do with _storage_.

Linux need to thank the mutitude of storage ignorant customers willing to pay the buck, because it is _Linux_ (put gasping sound here).

Linux _can_ be the "storage OS of choice", but this will not happen through neglect, or sheer incompetence coupled with lots of pride.

Back on topic: I'll try to keep up this "Linux storage lie" set forth by the james-bottomleys of the Linux community.

Quoted 2 lines

buckup and play be to rules at hand. Remember, most people are open to new ideas and better models. Propose one and you will find backing.

I never have found backing. It is all in the archives of linux-scsi mailing list. What happens is that even if people like your idea and write to you _privately_ to tell you that they like your idea, somewhere in their email, they tell you not to cross-post their message to the list because they have storage products which need Linux. The reason for this is that James Bottomley has established this politics that if you don't agree to his antics, your patches are never ever going in. Why else do you think IBM-ers agree with him that Linux SCSI doesn't need 64 bit LUNS?

_But_ I'm willing to try _again_. So I'll be proposing something later this morning. (You know, all engineers are optimists.)

Luben

#5 lore raw
Quoted 6 lines · Luben Tuikov

Yes, and I think you'll agree with me, the Maintainer isn't/shouldn't necessarily be the person "defining direction". The reasons are many but mostly:
* Documentation/ManagingStyle document (valuable read),
That document _really_ says it _all_. I suggest all developers, maintainers, and corporate _management_ reading this thread to read it.

Dude, that document is written in a very tongue-in-cheek style. There's a few clues:

"the preferred (or made up, depending on who you ask) management style"

"this document may or may not have anything to do with reality. It
started as a lark"

It's really not a club for you to beat James with.

#6 lore raw
Quoted 2 lines · Matthew Wilcox

Dude, that document is written in a very tongue-in-cheek style.

True, true. But sometimes you can say painful truths more easily if you do it as a joke. Most of the ManagementStyle document is perfectly valid.

Whether it has any bearing on this discussion is another matter ;)

Linus

#7 lore raw
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Matthew Wilcox

Dude, that document is written in a very tongue-in-cheek style.

True, true. But sometimes you can say painful truths more easily if you do it as a joke. Most of the ManagementStyle document is perfectly valid.

Yes, I thought I understood it when I read it first, but I later realized that my understanding was very superficial.

When I re-read it now, I cannot help chuckling, remembering how you kept saying "go wild", "make it so", "That is good, but it strikes me that there is no fundamental reason to limit ourselves to ..." on the git list ;-).

#8 lore raw
In reply to Luben Tuikov
Quoted 2 lines · Luben Tuikov

never ever going in. Why else do you think IBM-ers agree with him that Linux SCSI doesn't need 64 bit LUNS?

Please stop repeating that, no one said we should *not* implement a 64 bit LUN in linux scsi, and James posted a patch for 64 bit LUN. I posted a clarification in response to your earlier postings, you seem to have ignored or forgotten this post:

http://marc.theaimsgroup.com/?l=linux-scsi&m=112671847228275&w=2

I said:

"I am talking about the scsi spec, not the code. IMO linux scsi code should support W_LUN and 64 bit LUN."

-- Patrick Mansfield

#9 lore raw
Quoted 7 lines · Patrick Mansfield
Quoted 2 lines · Luben Tuikov

never ever going in. Why else do you think IBM-ers agree with him that Linux SCSI doesn't need 64 bit LUNS?

Quoted 6 lines

Please stop repeating that, no one said we should *not* implement a 64 bit LUN in linux scsi, and James posted a patch for 64 bit LUN. I posted a clarification in response to your earlier postings, you seem to have ignored or forgotten this post:

http://marc.theaimsgroup.com/?l=linux-scsi&m=112671847228275&w=2

Sorry.

I was refering to the bottom of this email:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112665156918643&w=2

Luben

#10 lore raw
In reply to Patrick Mansfield

Hi Patrick,

You have hit on one of the key word of my downfall.

Specifications!!!

I believe in them and they are the inflexable state machine which all OSes are required to address. Linux has a very bad history of avoiding the boundary conditions related to storage.

I am for following the rules of the spec, and will bet Linus would now agree more so than before. The problem is SCSI is a strange beast without a formal FSM. It is more of a BusPhase psuedo stated transport. It is smart enough to laugh at bad software designs and keep going. Sheesh, look at M$'s miniport.

This leads me to a point where a similar (but smarter) miniport could look interesting. However, this is also where the transport classes have their bases, afaics. Anyone please correct me where I have mistated (other than Linus, :-p).

Luben, I have a vested interest in seeing SAS run via SCSI. So this means you have one ex-demi-god from the world of maintainers looking to pull you have towards the current path and open to ideas and willing to back a better design and push it.

Cheers,

Andre Hedrick
LAD Storage Consulting Group

Quoted 24 lines · Patrick Mansfield
Quoted 2 lines · Luben Tuikov

never ever going in. Why else do you think IBM-ers agree with him that Linux SCSI doesn't need 64 bit LUNS?

Please stop repeating that, no one said we should *not* implement a 64 bit LUN in linux scsi, and James posted a patch for 64 bit LUN. I posted a clarification in response to your earlier postings, you seem to have ignored or forgotten this post:

http://marc.theaimsgroup.com/?l=linux-scsi&m=112671847228275&w=2

I said:

"I am talking about the scsi spec, not the code. IMO linux scsi code should support W_LUN and 64 bit LUN."

-- Patrick Mansfield
-
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/

#11 lore raw
Quoted 8 lines · Andre Hedrick

Hi Patrick,

You have hit on one of the key word of my downfall.

Specifications!!!

I believe in them and they are the inflexable state machine which all OSes are required to address.

Me too. I live and breathe by them.

Quoted 2 lines

I am for following the rules of the spec, and will bet Linus would now agree more so than before.

Me too.

An interesting thing which "the community" would appreciate is that M$ has aggressively started to "go by the spec" as far as SCSI is concerned.

Ding-ding!

Quoted 2 lines

The problem is SCSI is a strange beast without
a formal FSM. It is more of a BusPhase psuedo stated transport. It is

Oh, no, no, no! So much has changed Andre.

Just take a look at SAM, and I'm sure that you'll appreciate the object oriented design, the abstractions, etc. Really!

Recently all new protocols follow _explicit_ state machine definitions at each layer they define, and how it interacts with the layer above and below again by FSMs. It's all a good thing.

Quoted 4 lines

Luben, I have a vested interest in seeing SAS run via SCSI. So this means you have one ex-demi-god from the world of maintainers looking to pull you have towards the current path and open to ideas and willing to back a better design and push it.

Ok, thanks Andre. Much appreciated.

You are the first person to back me up _publicly_. Now if we can find a person from "the community" to do that, and get all the other people who've written me _privately_, we'd be in good shape.

Luben
P.S. Not sure if you have seen this link:
http://linux.adaptec.com/sas/

#12 lore raw

Hi all, hi Luben,

On Wed, Sep 28, 2005 at 04:56:20PM -0400, Luben Tuikov wrote:
(...)

Quoted 6 lines

Ok, thanks Andre. Much appreciated.

You are the first person to back me up _publicly_. Now if we can find a person from "the community" to do that, and get all the other people who've written me _privately_, we'd be in good shape.

I'm sure I'm not one of those who qualify best here, but having largely contributed to Linux acceptance at critical points at a handful of big customers here, I'd like to send some general feeling I get from there.

There are people buying expensive hardware. The type of hardware that costs $100k for just a few CPUs. Those people don't buy "the Adaptec XXX which runs best with Red Hat Enterprise" nor the "LSI YYY which runs best with Solaris", they buy a few $100k systems with 3 TB disk to store their monthly logs. They cannot even imagine that the hardware in the $100k system will not be fully supported by some recent OS, that's just plain silly. The OS cost is just a water drop in the middle of this. When they install Solaris on it because they're used to run it, it just works. When I sometimes just show them that Solaris is not adequate for daily greps in logs, and I show them how faster it is on a $1k Linux machine in the next rack, they feel they can switch to it easily. But if they discover that this system does not correctly support their $100k hardware, do you know which one was is the crap ? the $300 Red Hat or the $100k hardware ? [ oh, BTW, I forgot to tell you : they say "Red Hat", and not "Linux" because it does not sound like what they long considered an OS for tamagotchis - to use their own words - :-( ]

And when they go to adaptec site to find latest drivers and they only find patches which forces them to find another Linux to install the sources and guess how to patch and build, do you know which OS they consider as hobbyist's ? The Red Hat ! (which they can call "Linux" again then).

For those reasons, I could put Linux there on very specific places, mostly firewalls and load-balancers. A self-made distro with kernel 2.4 with patch-o-matic still is one of the most powerful and reliable firewalls around, and at only a few bucks. The same hardened install is used for load-balancers with my proxy. Seeing that the proxies have been stable for years, they bought between 50-100 RHEL licences. But that's all. Nowhere you will find anything serious using Linux in other areas. It's already a nightmare for them to get a hardware RAID card working while they just have to click on stupid icons in Windows to do the same. Right now, new Linux-based machines are turning back to plain IDE. SCSI was too much boring for them and not needed to do just networking. Period.

When they will buy hundreds of TB of SAS-based racks in the next few years, and they will learn the hard way that Linux does not even see them as disks, it will be too late to give my preferred OS a second chance.

Hans Reiser once said that every software needs a complete rewrite every 3 or 5 years (I don't precisely remember). I tend to agree with him. Maybe it's time to completely rewrite the SCSI subsystem, but maybe it will be too long, too risky and not worth the effort. Maybe it can simply coexist with another new subsystem. This is what Luben seems to have done : break no code, just bring a new subsystem which should not even give the SCSI maintainer too much work if he maintains it himself. At least I could understand some arguments against Reiser4 because it touched the VFS, but here we have a perfect example of something new which can live next to SCSI and probably some time will replace it definitely. Jeff has done this with libata (it even had to touch some pieces to coexist with piix4 and probably a few other chips).

Having read the discussion from the start here a few days ago, I believe that Luben maybe has not explained well to non-competent people like me what the goal of his work is. I've looked at the GIF on T10.org, but I think that the equivalent with what it currently implemented in Linux would be worth doing. Maybe we would even notice that current maintainers cannot agree on a same representation. Maybe it will enlighten some of us about the poor error reporting, the reasons why USB storage sometimes fails to assign a device when plugging a flash, etc...

Luben, you seem to have enough knowledge to draw both diagrams side-by-side :
- the T10 spec with colors on the boxes covered by your work
- the Linux view of SCSI

Perhaps we will see that current code can be extended without too much work, or perhaps we will see that it's definitely a dead end and that a new design will help a lot.

Anyway Luben, I fear that for some time, you'll have to provide pre-patched sources as well as binary kernels to enterprise customers who still try to get Linux working in production. I hope that this sad experience will not discourage other vendors from trying to take the opensource wagon, as it clearly brings fuel to closed-source drivers at the moment (no need to argue).

Eventhough I don't have SAS, I sincerely hope that a quick and smart solution will be found which keeps everyone's pride intact, as it seems to matter much those days. In an ideal situation, 2.7 would have been opened for a long time, and Luben's code would have been discussed to death as a new development needed to be merged before 2.8. Right now, as 2.7 is 2.6.<odd>, probably that ideas can gem before 2.6.15.

Just my personnal thoughts
Willy

PS: please don't CC me in return, I can read LKML. I haven't trimmed the CC list as nobody has complained yet.

#13 lore raw
Quoted 5 lines · Willy Tarreau

And when they go to adaptec site to find latest drivers and they only find patches which forces them to find another Linux to install the sources and guess how to patch and build, do you know which OS they consider as hobbyist's ? The Red Hat ! (which they can call "Linux" again then).

Adaptec is unfortunately a special case. QLogic and other enterprise vendors get along with quite well on $100k machines.

Both Luben and his predecessor, Justin Gibbs, were severely dissatisfied with the SCSI core. Often they have raised valid issues that need addressing, but their choice has been to work around or ignore existing code (and maintainers), rather than work with it, and fix it.

Quoted 4 lines

When they will buy hundreds of TB of SAS-based racks in the next few years, and they will learn the hard way that Linux does not even see them as disks, it will be too late to give my preferred OS a second chance.

Hardly. SAS support is coming, whether from Adaptec or someone else.

Quoted 6 lines

Having read the discussion from the start here a few days ago, I believe that Luben maybe has not explained well to non-competent people like me what the goal of his work is. I've looked at the GIF on T10.org, but I think that the equivalent with what it currently implemented in Linux would be worth doing. Maybe we would even notice that current maintainers cannot agree on a same representation.

The current maintainers seem to agree on the path to transport independence.

Quoted 6 lines

Anyway Luben, I fear that for some time, you'll have to provide pre-patched sources as well as binary kernels to enterprise customers who still try to get Linux working in production. I hope that this sad experience will not discourage other vendors from trying to take the opensource wagon, as it clearly brings fuel to closed-source drivers at the moment (no need to argue).

Yes, let's not argue this silliness. Other vendors don't seem to have this level of problem.

Quoted 7 lines

Eventhough I don't have SAS, I sincerely hope that a quick and smart solution will be found which keeps everyone's pride intact, as it seems to matter much those days. In an ideal situation, 2.7 would have been opened for a long time, and Luben's code would have been discussed to death as a new development needed to be merged before 2.8. Right now, as 2.7 is 2.6.<odd>, probably that ideas can gem before 2.6.15.

Sigh. This is not about pride. There's already a path to fixing up the SCSI core to work nicely with SAS (and nicer with FC/iSCSI). Changing to a new path midstream, in the middle of addressing the stated problems, causes more delay, more harm than good.

Jeff

#14 lore raw

From: Jeff Garzik <[email protected]>
Date: Wed, 28 Sep 2005 19:22:53 -0400

Quoted 4 lines

Both Luben and his predecessor, Justin Gibbs, were severely dissatisfied with the SCSI core. Often they have raised valid issues that need addressing, but their choice has been to work around or ignore existing code (and maintainers), rather than work with it, and fix it.

I'm in violent agreement here.

Justin was just as anti-social of an engineer as one could get. And, when you put an ex-FreeBSD guy onto Linux driver maintainence, what in the world could anyone expect. :-)

For example, instead of accepting that the symbol "current" is a reserved symbol when compiling under the Linux kernel, he decided that "sticking a square peg into a round hole" was a better way to deal with this, and thus he put an "#undef current" into the adaptec driver instead of simply renaming a structure member from "current" to something else.

I don't know how else to define "control freak".

#15 lore raw

Dave,

Was it really necessary to this far and rude?

I heard the snow is falling and there is a fresh shipment of hash headed out to the slopes, don't be late.

Not sure who to credit the following to:

When TOE's were introduced to Linux, there was a violent rejection of this hardware because Linux is superior in the NetStack than any other possible NetStack every created.

The point is there is a known history in Linux to reject things which steps on peoples' egos.

Have a great ski trip.

Cheers,

Andre

Quoted 28 lines · David S. Miller

From: Jeff Garzik <[email protected]>
Date: Wed, 28 Sep 2005 19:22:53 -0400

Quoted 4 lines

Both Luben and his predecessor, Justin Gibbs, were severely dissatisfied with the SCSI core. Often they have raised valid issues that need addressing, but their choice has been to work around or ignore existing code (and maintainers), rather than work with it, and fix it.

I'm in violent agreement here.

Justin was just as anti-social of an engineer as one could get. And, when you put an ex-FreeBSD guy onto Linux driver maintainence, what in the world could anyone expect. :-)

For example, instead of accepting that the symbol "current" is a reserved symbol when compiling under the Linux kernel, he decided that "sticking a square peg into a round hole" was a better way to deal with this, and thus he put an "#undef current" into the adaptec driver instead of simply renaming a structure member from "current" to something else.

I don't know how else to define "control freak".
-
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/

#16 lore raw

From: Andre Hedrick <[email protected]>
Date: Wed, 28 Sep 2005 22:30:58 -0700 (PDT)

Quoted 8 lines

Not sure who to credit the following to:

When TOE's were introduced to Linux, there was a violent rejection of this hardware because Linux is superior in the NetStack than any other possible NetStack every created.

The point is there is a known history in Linux to reject things which steps on peoples' egos.

In that case, it is indeed a vendor trying to shove their particular solution down our throats. They never even attempt to try out the alternatives, and we've even gone through the trouble of coming up with several. And they do this because their whole buisness model is all about their scheme to the exclusion of anything else, not because what they have is better.

#17 lore raw

On Thu, 29 Sep 2005, David S. Miller wrote:

Dave,

Thanks for filling in the details I was missing about the TOE history.

Glad to see you laugh about the ski stuff. I thought about snowboarding then realized I would make a great mogal for someone to do an ali off. If you are open to questions about TOE/RDMA stuff, would like to chat with you and see your POV on the subject.

Quoted 6 lines

In that case, it is indeed a vendor trying to shove their particular solution down our throats. They never even attempt to try out the alternatives, and we've even gone through the trouble of coming up with several. And they do this because their whole buisness model is all about their scheme to the exclusion of anything else, not because what they have is better.

Luben,

Reading Dave's points above tends to point to adaptec's current direction, as we all know. TOEs were rejected.

I stated I would help with SAS adoption because there is a SAS-Transport model. I asked about a possible libadaptec + libsas, and still waiting to see if you and adaptec are up for the task. Right now the only path open is the one Jeff Garzik is putting forward along with James and Christop. I have a vested interest in seeing SAS-Transport, otherwise I would have cut and run a long time ago.

These long email threads where everyone is shout from the top of their hill never wins anything. After a while the hill becomes flat (from all the stomping), and you become old and tired.

LSI pointed out they mask there SAS in firmware and make it show up in a scsi-like or scsi state. They also pointed out other vendors have taken this road. Even if Adaptec did not go this way in hardware, there still has to be a way to map into SCSI ... sheesh this is Adaptec known for SCSI.

Just an FYI, would suggest you cool your heels and listen for the quiet responses. There is more heat than light right now; maybe this thread will offset some of the cost in the energy criss. Will pass on advice handed to me (when I was a maintainer) relax and listen, nobody is out to get you (and they were right).

Cheers,

Andre

PS I didn't listen to that advice back then, don't make the same mistake.

#18 lore raw
Quoted 11 lines · Andre Hedrick

I stated I would help with SAS adoption because there is a SAS-Transport model. I asked about a possible libadaptec + libsas, and still waiting to see if you and adaptec are up for the task. Right now the only path open is the one Jeff Garzik is putting forward along with James and Christop. I have a vested interest in seeing SAS-Transport, otherwise I would have cut and run a long time ago.

These long email threads where everyone is shout from the top of their hill never wins anything. After a while the hill becomes flat (from all the stomping), and you become old and tired.

Quoted 5 lines

LSI pointed out they mask there SAS in firmware and make it show up in a scsi-like or scsi state. They also pointed out other vendors have taken this road. Even if Adaptec did not go this way in hardware, there still has to be a way to map into SCSI ... sheesh this is Adaptec known for SCSI.

Hi Andre,

Let me know if this 4 section write up satisfies:

Section 1: MPT, SCSI Core and JB's "transport attributes"
---------------------------------------------------------

SPI drivers (say 5 years ago)
-----------------------------
hardware implementation (bus connect)
firmware implementation (transport: SPI)
LLDD (exports SCSI devices (LUs))
SCSI Core
Command Sets

MPT-based drivers (now)
-----------------------
hardware implementation (interconnect/physical)
--> Transport Layer (firmware: FC/SPI/SAS/etc) <--
LLDD (exports SCSI devices (LUs))
SCSI Core
Command Sets

As you can see SCSI Core is _unaware_ of the transport. The transport is completely implemented in FIRMWARE, relieving the LLDD from worrying about it. Theoretically/ideally the same LLDD would work for _all_ transports, since the FW would export LUs to the LLDD, which would in turn register those with SCSI Core.

The layout is the same as before, achieving 100% backward software compatibility.

MPT-based drivers + James Bottomley's "transport attributes"
-------------------------------------------------------------
hardware implementation
Transport Layer <------+ FW/Transport dependent access method
LLDD <---------- + LLDD dependent access method
SCSI Core ---------------------'
Command Sets

This picture is _identical_ to the one above, but I've also shown what the "transport attributes" achieve:
They hook to the _LLDD_ to get to LLDD dependent way of accessing "transport attributes" (any transport). This is JB's template unifying _all_ transports.

Note that this isn't a _management_ layer or infrastructure, since, it _does not lie between_ the LLDD and SCSI Core. It merely implements attribute exporting.

Section 2: USB/SBP/SAS and SCSI Core
------------------------------------

hardware implementation (interconnect/physical)
firmware implementation (SDS: TMFs + Execute Command SCSI RPC)*
LLDD (Coherent interface to SDS)
--> Transport Layer (Transport common to LLDDs) <--
SCSI Core
Command Sets

* SDS, Service Delivery Subsystem (see SAM 4.6) TMF, Task Management Function (see SAM 7) Execute Command SCSI RPC (see SAM 5.1)

Most immediate difference from Section 1 is that
- the Transport Layer is _above_ the LLDD (in top-down).
- no need for LLDD/Firmware dependent access method to the Transport,
- Transport is accessed in the same way across all LLDDs of the same transport (USB/SBP/SAS).

Now since, the LLDDs all implement TMFs + Exec Cmnd SCSI RPC, you can have
- a transport common error handling and
- a transport common "attribute" access (sysfs),
across all LLDD of the same transport directly from userspace.

The reason the LLDDs all implement TMFs + Exec Cmnd SCSI RPC, is that the Firmware implements it, and the reason that the Firmware implements it is that the chip implements it (following the transport spec).

That is, you can have _different_ LLDDs connecting you to the _same place_ (maybe not at the same time, depending on the transport).

SCSI Core should be completely unaware of the Transport being used and Transport specific
Error handling is common to all such Transport specific LLDDs (via TMFs): one for SBP, one for USB, one for SAS.

The whole point of this USB/SBP/SAS Transport Layering is that you can access at each level, thus you can add new abstractions, e.g. SATL (libata), as is shown in the SATr06 spec.

Furthermore, when you look at the USB/SBP/SAS chips you will see nothing about "scsi_host", and all about "transport".

And the sysfs representation of the SAS domain is analogous to, say, the USB representation of the USB domain.

Section 3: Legacy Thinking or Thinking Legacy
---------------------------------------------

Traditionally Error Handling has been done in SCSI Core. The reason for this is that the first and only SCSI was Parallel SCSI and no other SCSI was around (and that SAM didn't exist back then).

This is how we have the SPI-centric EH methods
in the scsi host template right now:

	int (* eh_abort_handler)(struct scsi_cmnd *);
	int (* eh_device_reset_handler)(struct scsi_cmnd *);
	int (* eh_bus_reset_handler)(struct scsi_cmnd *);
	int (* eh_host_reset_handler)(struct scsi_cmnd *);

This is fine for Parallel SCSI (SPI) but for other transports it doesn't quite satisfy.

Let's admit it, with HCIL and with the EH, SCSI Core is still very SPI centric.

But we should _not_ break legacy drivers and backward support, yet we have to face the future.

The way we do this is we slowly, without disruption to older drivers introduce, in parallel, emerge a new, simpler, slimmer, faster SCSI Core, whereby we accommodate new infrastructures, yet, have 100% backward compatibility, via the current older SCSI Core. After all, both would be a bunch of functions in a bunch of files.

If X works with Y, do not disrupt it. Fix it if it's broken. Introduce innovation, functionality, better design, but not at the expense of breaking legacy.

To eliminate bugs, tweak old as little as possible, since you cannot test on _all_ hardware the old code works on.

To achieve maximum innovation and relevance in the fast changing world of storage, create, innovate new better, more accommodating design and infrastructures.

Section 4: Politics
-------------------

Let's face it: SAS is a new emerging technology. It will be the technology for the next 10-15 years, and *everybody* in Linux SCSI wants a piece of it. Everybody wants their name and contribution to it.

This is fine, but we need people who clearly understand the technology and clearly understand what, how and why it works. We need well-read and well educated people. Linux dedication is fine, but protocol knowlege is needed too.

Can Linux afford people who have never even read SAS to write SAS Code for Linux. Yes, sure. It is the Linux's ideology: "specs are cr@p".

Conclusion
----------

Even though the SAS Transport Layer follows an _already_ establised layering infrastructure for more (less?) exotic transports such as USB and SBP, James Bottomley has resisted its inclusion in Linux SCSI.

Have we lost our touch with the new calling it "non-traditional"? Will Linux become a dinosaur?

I'm not sure how many times one can split the SAS code? Will there be enough for everyone?

Quoted 5 lines

Just an FYI, would suggest you cool your heels and listen for the quiet responses. There is more heat than light right now; maybe this thread will offset some of the cost in the energy criss. Will pass on advice handed to me (when I was a maintainer) relax and listen, nobody is out to get you (and they were right).

Thank you Andre for the warm advice.

James, Linus, can we have this driver in the kernel now, please?

Thank you,
Luben

#19 lore raw
Quoted 5 lines · Luben Tuikov

This is how we have the SPI-centric EH methods in the scsi host template right now:

    int (* eh_abort_handler)(struct scsi_cmnd *);
    int (* eh_device_reset_handler)(struct scsi_cmnd *);
    int (* eh_bus_reset_handler)(struct scsi_cmnd *);
    int (* eh_host_reset_handler)(struct scsi_cmnd *);

So submit patches to fix it! You clearly understand what is wrong, so why not help change it?

Quoted 1 line

But we should _not_ break legacy drivers and backward support,

WRONG. This is not the way Linux works. We break internal APIs all the time. If you need to change one _thats_OK_. Userspace ABI is mostly another matter, but that's different from the internal data structures and functions.

Quoted 1 line

The way we do this is we slowly, without disruption to older drivers introduce, in parallel, emerge a new, simpler, slimmer, faster SCSI Core, whereby we accommodate new infrastructures, yet, have 100% backward compatibility, via the current older SCSI Core. After all, both would be a bunch of functions in a bunch of files.

Except this introduces bloat and multiplies maintainer load. Fix the existing one. If it breaks other in-core drivers, fix those to match. If it breaks out-of-tree drivers, too bad! They should get their code upstream and then they wouldn't need to worry.

Quoted 1 line

If X works with Y, do not disrupt it. Fix it if it's broken. Introduce innovation, functionality, better design, but not at the expense of breaking legacy.

This is not the way Linux works. It may be the way Adaptec works, but that's not relevant here.

Quoted 2 lines

Section 4: Politics
-------------------

s/Politics.*//g; I hate politics. Keep it off this list.

Cheers,
Kyle Moffett

#20 lore raw
Quoted 10 lines · Kyle Moffett
Quoted 6 lines · Luben Tuikov

This is how we have the SPI-centric EH methods in the scsi host template right now:

   int (* eh_abort_handler)(struct scsi_cmnd *);
   int (* eh_device_reset_handler)(struct scsi_cmnd *);
   int (* eh_bus_reset_handler)(struct scsi_cmnd *);
   int (* eh_host_reset_handler)(struct scsi_cmnd *);
Quoted 2 lines

So submit patches to fix it! You clearly understand what is wrong, so why not help change it?

Because
- I do not want to give heart attack to all existing LLDDs
- Some LLDD would never be able to be changed
- Some LLDD work on very _scarce_ hardware which we cannot test.
- plus such radical changes are neither warranted nor necessary.

It is better to keep legacy around, until all you'll have on your new serverboard is a SAS/SATA storage chip such as AIC-94xx or say BCM8603. Then you can compile out most of the legacy stuff.

Quoted 4 lines
Quoted 1 line

But we should _not_ break legacy drivers and backward support,

WRONG. This is not the way Linux works. We break internal APIs all the time. If you need to change one _thats_OK_. Userspace ABI is

Well, I can never have it right. Some people say you shouldn't break it, others say let's break the whole thing and give heart attack to all LLDDs, other say it is impossible to change all LLDD since the hardware is not around, etc, etc.

I think not breaking anything (for now at least) would be the _easiest_ and most painless way to transition.

Quoted 9 lines
Quoted 5 lines

The way we do this is we slowly, without disruption to older drivers introduce, in parallel, emerge a new, simpler, slimmer, faster SCSI Core, whereby we accommodate new infrastructures, yet, have 100% backward compatibility, via the current older SCSI Core. After all, both would be a bunch of functions in a bunch of files.

Except this introduces bloat and multiplies maintainer load. Fix the existing one. If it breaks other in-core drivers, fix those to

Well, not necessarily. It would be more painful and more maintainer load if we did what you suggest. The overhead would be enormous.

Quoted 5 lines
Quoted 2 lines

Section 4: Politics
-------------------

s/Politics.*//g; I hate politics. Keep it off this list.

Me too, but we are idealists. Politics is an integral part of life.

Long time ago, in a galaxy far, far away...
I literally sat in a meeting whereby technical staff of _several_ companies agreed that Pi=3.0.

Luben

#21 lore raw
Quoted 9 lines · Luben Tuikov
Quoted 8 lines · Kyle Moffett
Quoted 5 lines · Luben Tuikov

This is how we have the SPI-centric EH methods in the scsi host template right now:

   int (* eh_abort_handler)(struct scsi_cmnd *);
   int (* eh_device_reset_handler)(struct scsi_cmnd *);
   int (* eh_bus_reset_handler)(struct scsi_cmnd *);
   int (* eh_host_reset_handler)(struct scsi_cmnd *);
Quoted 4 lines
Quoted 1 line

So submit patches to fix it! You clearly understand what is wrong, so why not help change it?

Because
- I do not want to give heart attack to all existing LLDDs

Significance of change is not an issue, assuming the change is broken up into a collection of small obvious changes as highlighted in Documentation/SubmittingPatches

Quoted 1 line

- Some LLDD would never be able to be changed

Why not? It's easy to change APIs, even stuff as invasive as the VM, the device driver model, etc, and those get changed all the time.

Quoted 1 line

- Some LLDD work on very _scarce_ hardware which we cannot test.

You don't have to worry all that much about testing. If your patches are small and obviously correct (like they should be), then they will get enough review during submission that there will only be a very small number of bugs. The few remaining bugs will probably be ironed out in -mm. In any case, if nobody uses hardware anymore, eventually the driver will get sufficiently crufty and out of date that it will be recognized as such and removed.

Quoted 1 line

- plus such radical changes are neither warranted nor necessary.

Jeff Garzik et. al. seem to think that they are necessary, and I agree. You don't need to fork SCSI-core; doing so would just double the maintainer load, and _that_ is neither warranted nor necessary.

Quoted 1 line

It is better to keep legacy around, until all you'll have on your new serverboard is a SAS/SATA storage chip such as AIC-94xx or say BCM8603. Then you can compile out most of the legacy stuff.

Precisely. When nobody uses the legacy drivers to the point that they aren't fixed or maintained anymore because no-one reports bugs, then said drivers can be removed from the kernel entirely, along with any support code. The model I describe here works better because it keeps a _single_ clean core subsystem, and leaves any lack-of-maintenance crap in the old drivers.

Quoted 1 line

I think not breaking anything (for now at least) would be the _easiest_ and most painless way to transition.

Until somebody wants to add a new high-level SCSI feature that works for both the new and the old devices. Then they have to do it _twice_.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

The way we do this is we slowly, without disruption to older drivers introduce, in parallel, emerge a new, simpler, slimmer, faster SCSI Core, whereby we accommodate new infrastructures, yet, have 100% backward compatibility, via the current older SCSI Core. After all, both would be a bunch of functions in a bunch of files.

Except this introduces bloat and multiplies maintainer load. Fix the existing one. If it breaks other in-core drivers, fix those to

Well, not necessarily. It would be more painful and more maintainer load if we did what you suggest. The overhead would be enormous.

So you're saying fixing the current SCSI subsystem once *now* costs more than applying all *future* SCSI fixes to _two_ SCSI subsystems, handling bug reports for _two_ SCSI subsystems, etc.

Quoted 3 lines
Quoted 1 line

s/Politics.*//g; I hate politics. Keep it off this list.

Me too, but we are idealists. Politics is an integral part of life.

Politics are not an integral part of productive technical discussions, though. If you discuss technical topics and provide realistic technical descriptions, examples, reasons, code, etc, then politics tends not to matter in the discussion, and we're all happier people.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$ L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+ PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-) ------END GEEK CODE BLOCK------

#22 lore raw
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 6 lines

The way we do this is we slowly, without disruption to older drivers introduce, in parallel, emerge a new, simpler, slimmer, faster SCSI Core, whereby we accommodate new infrastructures, yet, have 100% backward compatibility, via the current older SCSI Core. After all, both would be a bunch of functions in a bunch of files.

Except this introduces bloat and multiplies maintainer load. Fix the existing one. If it breaks other in-core drivers, fix those to

Quoted 8 lines
Quoted 3 lines

Well, not necessarily. It would be more painful and more maintainer load if we did what you suggest. The overhead would be enormous.

So you're saying fixing the current SCSI subsystem once *now* costs more than applying all *future* SCSI fixes to _two_ SCSI subsystems, handling bug reports for _two_ SCSI subsystems, etc.

Luben has more than once called for adding a small number of additional calls to the existing SCSI core. These calls would implement the new (reduced) functionallity. The old calls would continue to support the full SPI functionallity. No existing LLDD would need modification.

Then, over time, more radical restructuring could be done that pulls SPI out of SCSI core.

I believe this proposal is what he was talking about, not the brand new simplified SCSI core that has been discussed recently in this thread.

Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century

#23 lore raw
Quoted 7 lines · Greg Freemyer

Luben has more than once called for adding a small number of additional calls to the existing SCSI core. These calls would implement the new (reduced) functionallity. The old calls would continue to support the full SPI functionallity. No existing LLDD would need modification.

Quoted 6 lines

Then, over time, more radical restructuring could be done that pulls SPI out of SCSI core.

I believe this proposal is what he was talking about, not the brand new simplified SCSI core that has been discussed recently in this thread.

See? There _are_ smart people out there.

Luben

#24 lore raw
In reply to Greg Freemyer
Quoted 5 lines · Greg Freemyer

Luben has more than once called for adding a small number of additional calls to the existing SCSI core. These calls would implement the new (reduced) functionallity. The old calls would continue to support the full SPI functionallity. No existing LLDD would need modification.

IOW, what Luben wants is:

if (Luben)
do this
else
do current stuff

If this is the case, why bother touching drivers/scsi/* at all?

Regards,

Jeff

#25 lore raw
Quoted 7 lines · Jeff Garzik
Quoted 5 lines · Greg Freemyer

Luben has more than once called for adding a small number of additional calls to the existing SCSI core. These calls would implement the new (reduced) functionallity. The old calls would continue to support the full SPI functionallity. No existing LLDD would need modification.

Quoted 8 lines

IOW, what Luben wants is:

if (Luben)
do this
else
do current stuff

If this is the case, why bother touching drivers/scsi/* at all?

that's the reason why I proposed that this moved to drivers/sas/* or somewhere else so that there is no maintaining conflict.

Regards,
Willy

#26 lore raw
Quoted 17 lines · Willy Tarreau
Quoted 15 lines · Jeff Garzik
Quoted 5 lines · Greg Freemyer

Luben has more than once called for adding a small number of additional calls to the existing SCSI core. These calls would implement the new (reduced) functionallity. The old calls would continue to support the full SPI functionallity. No existing LLDD would need modification.

IOW, what Luben wants is:

if (Luben)
do this
else
do current stuff

Quoted 5 lines
Quoted 1 line

If this is the case, why bother touching drivers/scsi/* at all?

that's the reason why I proposed that this moved to drivers/sas/* or somewhere else so that there is no maintaining conflict.

Yes, it has been moved already there.
http://linux.adaptec.com/sas/

Luben

#27 lore raw
In reply to Jeff Garzik
Quoted 9 lines · Jeff Garzik
Quoted 5 lines · Greg Freemyer

Luben has more than once called for adding a small number of additional calls to the existing SCSI core. These calls would implement the new (reduced) functionallity. The old calls would continue to support the full SPI functionallity. No existing LLDD would need modification.

Quoted 8 lines

IOW, what Luben wants is:

if (Luben)
do this
else
do current stuff

If this is the case, why bother touching drivers/scsi/* at all?

In order to have a new better, faster, slimmer SCSI Core.

Luben

#28 lore raw
In reply to Kyle Moffett
Quoted 1 line · Kyle Moffett

Jeff Garzik et. al. seem to think that they are necessary, and I

I've been contending this since before Jeff started work on libata. But none of the ideas: 64 bit LUN, HCIL removal, etc., were accepted with "submit a patch".

Quoted 3 lines

So you're saying fixing the current SCSI subsystem once *now* costs more than applying all *future* SCSI fixes to _two_ SCSI subsystems, handling bug reports for _two_ SCSI subsystems, etc.

I'm saying that the current "old" one is already obsolete, when all you have is a SAS chip on your mainboard.

All you need is a small, tiny, fast, slim SCSI Core.

Quoted 10 lines
Quoted 3 lines
Quoted 1 line

s/Politics.*//g; I hate politics. Keep it off this list.

Me too, but we are idealists. Politics is an integral part of life.

Politics are not an integral part of productive technical discussions, though. If you discuss technical topics and provide realistic technical descriptions, examples, reasons, code, etc, then politics tends not to matter in the discussion, and we're all happier people.

Yes, please re-read this thread, and open and read all the references I've included to SAM, SPC, SAS and SAT of T10.org.

Politics: "Nah, whatever you say, specs are *crap* and we'll do it our way. We are not interested in your way, even if it were better. Oh, and BTW, REQUEST SENSE clears ACA and LUN is a u64."

See?
Luben

#29 lore raw
Quoted 2 lines · Luben Tuikov

But none of the ideas: 64 bit LUN, HCIL removal, etc., were accepted with "submit a patch".

I concede this may have been the response in the past. Its not, now.

Quoted 7 lines
Quoted 1 line

So you're saying fixing the current SCSI subsystem once *now* costs more than applying all *future* SCSI fixes to _two_ SCSI subsystems, handling bug reports for _two_ SCSI subsystems, etc.

I'm saying that the current "old" one is already obsolete, when all you have is a SAS chip on your mainboard.

All you need is a small, tiny, fast, slim SCSI Core.

Then don't use it at all. Write a block driver, if you really feel we need two SCSI cores.

Quoted 4 lines

Politics: "Nah, whatever you say, specs are *crap* and we'll do it our way. We are not interested in your way, even if it were better. Oh, and BTW, REQUEST SENSE clears ACA and LUN is a u64."

This is a misrepresentation. -We- understand the stuff you have posted.

But you continue to demonstrate that you simply do not understand the existing SCSI core code.

The SAS transport class supports commonality across all SAS implementations. This includes both MPT and Adaptec 94xx.

SAS transport class + libsas supports software implementations of SAS, including transport layer management. This includes Adaptec 94xx but NOT MPT.

Jeff

#30 lore raw
Quoted 38 lines · Jeff Garzik
Quoted 2 lines · Luben Tuikov

But none of the ideas: 64 bit LUN, HCIL removal, etc., were accepted with "submit a patch".

I concede this may have been the response in the past. Its not, now.

Quoted 9 lines
Quoted 3 lines

So you're saying fixing the current SCSI subsystem once *now* costs more than applying all *future* SCSI fixes to _two_ SCSI subsystems, handling bug reports for _two_ SCSI subsystems, etc.

I'm saying that the current "old" one is already obsolete, when all you have is a SAS chip on your mainboard.

All you need is a small, tiny, fast, slim SCSI Core.

Then don't use it at all. Write a block driver, if you really feel we need two SCSI cores.

Quoted 4 lines

Politics: "Nah, whatever you say, specs are *crap* and we'll do it our way. We are not interested in your way, even if it were better. Oh, and BTW, REQUEST SENSE clears ACA and LUN is a u64."

This is a misrepresentation. -We- understand the stuff you have posted.

But you continue to demonstrate that you simply do not understand the existing SCSI core code.

Quoted 6 lines

The SAS transport class supports commonality across all SAS implementations. This includes both MPT and Adaptec 94xx.

SAS transport class + libsas supports software implementations of SAS, including transport layer management. This includes Adaptec 94xx but NOT MPT.

You almost get it right, other than the layering infrastructure.

The SAS Transport Layer is a layer in its own right. It is not a "libsas".

MPT and open transport a very different, one hides the transport, i.e. the transport layer is in firmware; the other exposes it and needs a transport layer. See the pictures here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112810649712793&w=2

Luben

#31 lore raw
Quoted 7 lines · Luben Tuikov
Quoted 6 lines · Jeff Garzik

This is a misrepresentation. -We- understand the stuff you have posted.

But you continue to demonstrate that you simply do not understand the existing SCSI core code.

The SAS transport class supports commonality across all SAS implementations. This includes both MPT and Adaptec 94xx.

Quoted 7 lines
Quoted 1 line

SAS transport class + libsas supports software implementations of SAS, including transport layer management. This includes Adaptec 94xx but NOT MPT.

You almost get it right, other than the layering infrastructure.

The SAS Transport Layer is a layer in its own right. It is not a "libsas".

Different open transport hardware will expose the underlying network at different levels.

Hardware A might provide direct access to SSP and IDENTIFY/CONNECT frame handling, while Hardware B may handle that internally, while still providing full SMP access for the transport layer to discovery topology and build its routing table.

We cannot assume that all open transport hardware will function the same, hence the better approach is a library of helpers that function in concert with LLDD to form a transport layer.

Quoted 2 lines

MPT and open transport a very different, one hides the transport, i.e. the transport layer is in firmware; the other exposes it

For the 1001th time, we know all this.

Jeff

#32 lore raw
In reply to Luben Tuikov
Quoted 1 line · Luben Tuikov

James, Linus, can we have this driver in the kernel now, please?

A while ago I told you that if you could show that the transport class abstraction could not support both the aic94xx and LSI SAS cards then we could look at doing SAS differently. Since then you have asserted many times that a transport class could not work for the aic94xx (mostly by making inaccurate statements about what the transport class abstraction is) but have never actually provided any evidence for your assertion.

Quoted 6 lines · you

Now to things more pertinent, which I'm sure people are interested in:

Jeff has been appointed to the role of integrating the SAS code with the Linux SCSI _model_, with James Bottomley's "transport attributes".
So you can expect more patches from him.

So very soon now, with proof by code, we shall have confirmation or negation of that assertion. I'll wait quietly for this to happen, and I would suggest you do the same.

James

#33 lore raw
Quoted 7 lines · James Bottomley
Quoted 1 line · Luben Tuikov

James, Linus, can we have this driver in the kernel now, please?

A while ago I told you that if you could show that the transport class abstraction could not support both the aic94xx and LSI SAS cards then we

I have, by example and by spec. They both use two different and distinct architectures.

Now _you_ have decided that this isn't the case, simply because you want to prove your own idea. (which breaks SAM layering)

I think I explained the similarity of the SAS Transport Layer to *USB and SBP*.

As I said: everyone wants a pice of the SAS code.
You do too.

I'm sure you'll do whatever humanly possible to show that _your_ idea can be applied: you can do this now:
just use a big if () { ... } else { ... } statement and you're done.

Furthermore I do not see the reasons to umbrella both "aic94xx and LSI cards" when they are _completely different_ in architecture: MPT and open transport (ala USB Storage and SBP).

Quoted 4 lines

could look at doing SAS differently. Since then you have asserted many times that a transport class could not work for the aic94xx (mostly by making inaccurate statements about what the transport class abstraction is) but have never actually provided any evidence for your assertion.

The code is here:
http://linux.adaptec.com/sas/

Quoted 10 lines
Quoted 6 lines

Now to things more pertinent, which I'm sure people are interested in:

Jeff has been appointed to the role of integrating the SAS code with the Linux SCSI _model_, with James Bottomley's "transport attributes".
So you can expect more patches from him.

So very soon now, with proof by code, we shall have confirmation or negation of that assertion. I'll wait quietly for this to happen, and I would suggest you do the same.

I just thought it was only fare to the rest of the community to know how far the politics has escalated.

Everyone wants a piece of the SAS code.

Luben

#34 lore raw
Quoted 4 lines · Luben Tuikov

I'm sure you'll do whatever humanly possible to show that _your_ idea can be applied: you can do this now:
just use a big if () { ... } else { ... } statement and you're done.

This is not how we do things in Linux. You're doubling the maintenance burden.

If you really want to do this, at least don't fill up drivers/scsi/ with an additional, completely unrelated codepath.

Quoted 3 lines

Furthermore I do not see the reasons to umbrella both "aic94xx and LSI cards" when they are _completely different_ in architecture: MPT and open transport (ala USB Storage and SBP).

There is commonality between aic94xx and MPT/LSI stuff. aic94xx SAS transport layer is a superset of MPT/LSI SAS transport: it clearly needs far more management code.

We understand this. The part you don't understand is that we want to emphasize the commonality, rather than let aic94xx and MPT/LSI go in completely different directions.

Read it again: aic94xx/BCMxxx is a superset of functionality, not completely different.

Jeff

#35 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 4 lines · Luben Tuikov

I'm sure you'll do whatever humanly possible to show that _your_ idea can be applied: you can do this now:
just use a big if () { ... } else { ... } statement and you're done.

This is not how we do things in Linux. You're doubling the maintenance burden.

No necessarily. See below.

Quoted 2 lines

If you really want to do this, at least don't fill up drivers/scsi/ with an additional, completely unrelated codepath.

How do you say it is unrelated?

Is USB storage unrelated? (other than the fact that it doesn't live in drivers/scsi/)

Quoted 3 lines

There is commonality between aic94xx and MPT/LSI stuff. aic94xx SAS transport layer is a superset of MPT/LSI SAS transport: it clearly needs far more management code.

And MPT/LSI SAS does not need this managament as this layer is completely implemented in FW and not exposed (and for a reason).

Quoted 3 lines

We understand this. The part you don't understand is that we want to emphasize the commonality, rather than let aic94xx and MPT/LSI go in completely different directions.

But this was LSI's decision, remember? We did work together, until LSI and Dell decided that they'd rather let Christoph do it. (Since who cares about the technological merit of the code when it will be accepted into the kernel?)

Now you want to integrate the two? Apparently LSI and Dell haven't made up their mind.

As I said: Vendors are completely playing to the tune of a couple of people at linux-scsi, for this reason we haven't seen _any_ SCSI or Storage _innovation_ in SCSI Core.

As opposed to those vendors saying: We _really_ need 64 bit LUNS and it would be really nice to get rid of HCIL, etc, etc.

If all vendors pushed for that and were not afraid to speak up (because they have drivers to write and patches to submit and want acceptance), then SCSI Core would be a better place.

IMO, 64 bit LUNs and no HCIL is more important than "transport attributes" and should've _preceded_ them.

The fact that you're trying to umbrella them together, doesn't make it _technologically_ correct.

Remember, a person's fall starts when they're surrounded by "Yes" men.

Quoted 2 lines

Read it again: aic94xx/BCMxxx is a superset of functionality, not completely different.

One implements all transport related tasks in FW and exposes only LUs to the LLDD, the other implements only the interface to the transport in the chip (the interconnect), and the rest is handed to upper layers.

If you sit down with a clean sheet of _paper and a pencil_ and try to draw out the layering infrastructure for both and how they interface with SCSI Core, you'll see that with MPT, things are _upside_ down compared to USB/SBP/SAS. Now trying to reconcile both, while possible, would be extremely _ugly_, unless say, you can fake out event formation in an MPT based LLDD, but then again, you'd need to resolve the host template thing...

It would just be extremely ugly and not as flowing and straightforward as the current code is.

Luben

#36 lore raw
Quoted 2 lines · Luben Tuikov

As opposed to those vendors saying: We _really_ need 64 bit LUNS and it would be really nice to get rid of HCIL, etc, etc.

Everybody agrees with this 100%

Note that James submitted a sdev_printk() patch in the past few days, which assists in removing HCIL from the SCSI core.

Quoted 2 lines

IMO, 64 bit LUNs and no HCIL is more important than "transport attributes" and should've _preceded_ them.

Agreed. But that's a lot of work, and I doubt people want to delay SAS further to wait for complete HCIL elimination.

Quoted 2 lines

The fact that you're trying to umbrella them together, doesn't make it _technologically_ correct.

It's muddled together, yes. That doesn't make it any less correct. It's just not a clean, immediate separation. Its a separation that takes time.

Jeff

#37 lore raw
In reply to Luben Tuikov
Quoted 11 lines · Luben Tuikov

Hi Andre,

Let me know if this 4 section write up satisfies:

Section 4: Politics
-------------------

Let's face it: SAS is a new emerging technology. It will be the technology for the next 10-15 years, and *everybody* in Linux SCSI wants a piece of it. Everybody wants their name and contribution to it.

No true, many of us could careless about credit list.

Quoted 5 lines

This is fine, but we need people who clearly understand the technology and clearly understand what, how and why it works. We need well-read and well educated people. Linux dedication is fine, but protocol knowlege is needed too.

Sometimes teaching others is a better way to bring them around to your view point while learning about their goals. Since everyone/most agree your T10 knowledge is strong, others have pointed out you are savy enough to work around problems over fixing them in general. Blah blah ...

Just show everyone why it can not work the "Linux Way" and defend the points logically. Should the defense of it not be possible, then the point is lost.

Quoted 3 lines

Can Linux afford people who have never even read SAS to write SAS Code for Linux. Yes, sure. It is the Linux's ideology: "specs are cr@p".

SPECs become crap when organizations like STA with T10 make joining and voting on the technology under NCITS $10,000.00 annual membership. This is old boys club rules, otherwise I would have joined and terrorized T10 like I did to T13. Exclusion breeds distrust.

Quoted 7 lines

Conclusion
----------

Even though the SAS Transport Layer follows an _already_ establised layering infrastructure for more (less?) exotic transports such as USB and SBP, James Bottomley has resisted its inclusion in Linux SCSI.

If this is accurate then it is fair to raise a question; however, few can stand in judgement because they were present in for the discussions. The remander (self included) are in the dark.

Cheers,

Andre

#38 lore raw
Quoted 2 lines · Andre Hedrick

No true, many of us could careless about credit list.

I wasn't talking about you. They know who they are.

Quoted 4 lines

Sometimes teaching others is a better way to bring them around to your view point while learning about their goals. Since everyone/most agree your T10 knowledge is strong, others have pointed out you are savy enough to work around problems over fixing them in general. Blah blah ...

Thank you Andre.

Quoted 3 lines

Just show everyone why it can not work the "Linux Way" and defend the points logically. Should the defense of it not be possible, then the point is lost.

I think I have. All the references to T10, all the pictures to the email you replied to which you deleted, all the words.

Quoted 4 lines

SPECs become crap when organizations like STA with T10 make joining and voting on the technology under NCITS $10,000.00 annual membership. This is old boys club rules, otherwise I would have joined and terrorized T10 like I did to T13. Exclusion breeds distrust.

Well, the T10.org reflector is open to everyone.

Of course voting-membership is expensive. And it should be so. They don't want every "Joe" (no offence to Joe or to LKML or LSML participants) to participate.

If you are a voting member then you really have a reason, you really know what you're talking about and voting for and you really are serious. It means that you or your company care.
It also becoms quickly enough obvious if you know your stuff after a meeting or two.

Luben

#39 lore raw
In reply to Luben Tuikov
Quoted 1 line · Luben Tuikov

MPT-based drivers + James Bottomley's "transport attributes"

You continue to fail to see that a transport class is more than just transport attributes.

You continue to fail to see that working on transport class support IS a transport layer, that includes management.

Is you don't understand this fundamental stuff, how can we expect you to get it right?

Jeff

#40 lore raw
Quoted 8 lines · Jeff Garzik
Quoted 1 line · Luben Tuikov

MPT-based drivers + James Bottomley's "transport attributes"

You continue to fail to see that a transport class is more than just transport attributes.

Quoted 7 lines

You continue to fail to see that working on transport class support IS a transport layer, that includes management.

Is you don't understand this fundamental stuff, how can we expect you to get it right?

From what I see, because of its *layering* position

JB's "transport attributes" cannot satisfy open transport.

The reason is that MPT-based drivers indeed do need host template in the LLDD.

Open Transport (SBP/USB/SAS) do not, since the chip is only an interface to the transport.

The host template is implemented by a transport layer, say USB Storage or the SAS Transport Layer.

This allows you to do great things, like layer
intersection.

Luben

#41 lore raw
Quoted 6 lines · Luben Tuikov
Quoted 5 lines · Jeff Garzik
Quoted 1 line · Luben Tuikov

MPT-based drivers + James Bottomley's "transport attributes"

You continue to fail to see that a transport class is more than just transport attributes.

Quoted 7 lines
Quoted 6 lines

You continue to fail to see that working on transport class support IS a transport layer, that includes management.

Is you don't understand this fundamental stuff, how can we expect you to get it right?

From what I see, because of its *layering* position

JB's "transport attributes" cannot satisfy open transport.

Repeating verbatim the above quote: a transport class is more than just transport attributes.

Quoted 8 lines

The reason is that MPT-based drivers indeed do need host template in the LLDD.

Open Transport (SBP/USB/SAS) do not, since the chip is only an interface to the transport.

The host template is implemented by a transport layer, say USB Storage or the SAS Transport Layer.

Every chip is ultimately an interface to the transport, regardless of whether the transport layer is largely managed by software (aic94xx) or firmware (MPT). SCSI host template can work just fine with open transport hardware.

Jeff

#42 lore raw
Quoted 6 lines · Jeff Garzik
Quoted 2 lines

From what I see, because of its *layering* position JB's "transport attributes" cannot satisfy open transport.

Repeating verbatim the above quote: a transport class is more than just transport attributes.

a) "Transport Attributes" _is_ its name,
b) It sits across SCSI Core, i.e. on the same level.
c) It was never intended to add management.
d) Its inteface to SCSI Core is badly defined and an "invention", (and very poor at that).

The reason for d) is that
1) it tries to unify different _transports_,
2) does _not_ follow _any_ spec or standard.

Look at this, while you repeat verbaitm a single quote, I give you technical arguments, then you just repeat a single quote verbatim... Sad.

Quoted 4 lines

Every chip is ultimately an interface to the transport, regardless of whether the transport layer is largely managed by software (aic94xx) or firmware (MPT). SCSI host template can work just fine with open transport hardware.

Maybe the picures and the write up here will help:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112810649712793&w=2

Luben

#43 lore raw
Quoted 11 lines · Luben Tuikov
Quoted 6 lines · Jeff Garzik
Quoted 3 lines

From what I see, because of its *layering* position

JB's "transport attributes" cannot satisfy open transport.

Repeating verbatim the above quote: a transport class is more than just transport attributes.

a) "Transport Attributes" _is_ its name,

No, transport class is its name. Think about a standard object-oriented paradigm. Each transport has unique characteristics. The proper place to export these and manage these characteristics is the transport layer, as SAM agrees. The manifestation of the transport layer is the transport class.

You have to look beyond the current code, to see this.

An implementation of a transport class, in conjunction with helper functions common to all transports (SCSI core), combines to form the transport layer for a specific transport.

Quoted 2 lines

b) It sits across SCSI Core, i.e. on the same level.
c) It was never intended to add management.

SCSI core is nothing but a set of helper functions and support code that enable the transport class and LLDD to implement the transport layer.

Quoted 2 lines

d) Its inteface to SCSI Core is badly defined and an "invention", (and very poor at that).

Strongly disagree. This invention is defined by -needs-, as is other code in Linux. If we have new needs, we change the code.

Quoted 2 lines

The reason for d) is that
2) does _not_ follow _any_ spec or standard.

That's fine, since its an internal kernel API.

Jeff

#44 lore raw
Quoted 1 line · Jeff Garzik

No, transport class is its name. Think about a standard object-oriented

Not according to Kconfig:

menu "SCSI Transport Attributes"
depends on SCSI

config SCSI_SPI_ATTRS
tristate "Parallel SCSI (SPI) Transport Attributes" depends on SCSI
help
If you wish to export transport-specific information about each attached SCSI device to sysfs, say Y. Otherwise, say N.

config SCSI_FC_ATTRS
tristate "FiberChannel Transport Attributes" depends on SCSI
help
If you wish to export transport-specific information about each attached FiberChannel device to sysfs, say Y. Otherwise, say N.

config SCSI_ISCSI_ATTRS
tristate "iSCSI Transport Attributes"
depends on SCSI
help
If you wish to export transport-specific information about each attached iSCSI device to sysfs, say Y. Otherwise, say N.

config SCSI_SAS_ATTRS
tristate "SAS Transport Attributes"
depends on SCSI
help
If you wish to export transport-specific information about each attached SAS device to sysfs, say Y.

endmenu

Quoted 3 lines

paradigm. Each transport has unique characteristics. The proper place to export these and manage these characteristics is the transport layer, as SAM agrees.

But:

Quoted 2 lines

The manifestation of the transport layer is the
transport class.

Bzzzt! Wrong.

This is where you and James Bottomley make the wrong assesment.

Having the SCSI host template in the LLDD tells everyone immeditealy that you have it all wrong as far as anything SAM/SPC is concerned.

Look at any transport spec, how little SCSI Host template is there.

You need to understand that declaring the host template in the LLDD is, and has always been, the _exception_, not the rule. The reason is legacy Parallel SCSI.

It is MPT based drivers who are the exception, not the rule, and JB's "transport attributes" makes it the rule, and a transport layer (what you call libsas), the exception.

It is wrong for a host template to "branch out" to a transport layer as you're doing it now. Think about it. The layering infrastructure is upside down.

Quoted 1 line

You have to look beyond the current code, to see this.

Eh, well, not that you put it like this, I expect that you'll completely pull out the implementation from my code and put it in the "transport attributes" and call it your own.

I don't want to look beyond the current code, I'm discussing things now, as they are. How many times is JB going to change the "transport attributes" just because FC needed one more thing or because of, as often has been recently seen, "brown paper bag" fix?

Quoted 3 lines

An implementation of a transport class, in conjunction with helper functions common to all transports (SCSI core), combines to form the transport layer for a specific transport.

Should:

The transport layer sits below SCSI Core and above the LLDD. SCSI Core is completely unaware of the transport layer. The LLDD communicates with the transport layer via the event interface (as shown in the SAS Transport layer) and the transport layer communicates with the LLDD via the Execute Command SCSI RPC and TMF. All as outlined here:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112629423714248&w=2

Quoted 6 lines
Quoted 2 lines

b) It sits across SCSI Core, i.e. on the same level.
c) It was never intended to add management.

SCSI core is nothing but a set of helper functions and support code that enable the transport class and LLDD to implement the transport layer.

Again you fail to see that the LLDD should _not_ implement the host template as has been traditionally done. The reason with this is that simply the LLDD has nothing to do with the host template. Unless you're dealing with MPT-based LLDD which implement everything in FW and export LUs to SCSI Core (which is fine too, as long as they do not dictate how SCSI Core should work).

Notice that for MPT-based solution, SCSI Core wouldn't even do LU discovery (unless you can turn that off via FW dependent ways).

Quoted 5 lines
Quoted 2 lines

d) Its inteface to SCSI Core is badly defined and an "invention", (and very poor at that).

Strongly disagree. This invention is defined by -needs-, as is other code in Linux. If we have new needs, we change the code.

You defence of your friends architecture is duly noted. But if, as has been pointed out, you take a look at the evolvement of this "invention" you'll see how it was and still is _meandering_ in the technological maze to find its place.

All the while a transport layer like USB/SPB/SAS and maybe iSCSI just sits "right". Think about it.

Quoted 5 lines
Quoted 2 lines

The reason for d) is that
2) does _not_ follow _any_ spec or standard.

That's fine, since its an internal kernel API.

Now, lets shove it down the throat of eveybody.

You forgot to say something about
1) it tries to unify different _transports_.
I don't expect a blurb on that, btw.

Luben

#45 lore raw
Quoted 17 lines · Luben Tuikov
Quoted 1 line · Jeff Garzik

No, transport class is its name. Think about a standard object-oriented

Not according to Kconfig:

menu "SCSI Transport Attributes"
depends on SCSI

config SCSI_SPI_ATTRS
tristate "Parallel SCSI (SPI) Transport Attributes" depends on SCSI
help
If you wish to export transport-specific information about each attached SCSI device to sysfs, say Y. Otherwise, say N.

Quoted 8 lines

config SCSI_FC_ATTRS
tristate "FiberChannel Transport Attributes" depends on SCSI
help
If you wish to export transport-specific information about each attached FiberChannel device to sysfs, say Y. Otherwise, say N.

For FC there is code like the fc_rport stuff which exports a sysfs interface but also does a lot more like probing and queue blocking.

Quoted 7 lines

config SCSI_ISCSI_ATTRS
tristate "iSCSI Transport Attributes"
depends on SCSI
help
If you wish to export transport-specific information about each attached iSCSI device to sysfs, say Y. Otherwise, say N.

And the iSCSI class does do a lot more now too. This just has not been updated. It handles the userspace to kernel communication, session and connection sysfs interface setup, and there were some patches that added the ability to tell scsi-ml to stop queueing commands to a iscsi driver.

Structures like the fc_rport and iscsi_session are managed by the transport classes so scsi-ml never knows about them (except for that scanning bug). And it is possible to share them between HW and software or partial software solutions. I do agree for some iscsi sitautions having a layer over the eh or command exection where the transport really is more of a layer like your design would be nice (I am not refferring to the code duplication though becuase iSCSI would like some of yrou fixes :), but at the same time there are places where code can be shared between a interface that hides the lower level details and one that implements them in software. Maybe it is not this way for SAS though.

#46 lore raw
Quoted 3 lines · Mike Christie

For FC there is code like the fc_rport stuff which exports a sysfs interface but also does a lot more like probing and queue blocking.

And the iSCSI class does do a lot more now too. This just has not been updated. It handles the userspace to kernel communication, session and connection sysfs interface setup,

Great. Exactly.

Quoted 1 line

Structures like the fc_rport and iscsi_session are managed by the transport classes so scsi-ml never knows about them (except for that scanning bug). And it is possible to share them between HW and software or partial software solutions. I do agree for some iscsi sitautions having a layer over the eh or command exection where the transport really is more of a layer like your design would be nice (I am not refferring to the code duplication though becuase iSCSI would like some of yrou fixes :), but at the same time there are places where code can be shared between a interface that hides the lower level details and one that implements them in software. Maybe it is not this way for SAS though.

Adaptec's SAS stuff implements the standard high level SCSI model as an API, which is a pretty decent direction for SCSI long term: provides a transport-independent execute-scsi-command high level hook (along with the other task management functions), and hides the transport details for the most part.

That's fine, and works for iSCSI as well.

I just disagree that we need to have two concurrent APIs for SCSI, completely separate from each other, and mildly duplicating each other's code.

The current SCSI code will morph in the proper direction given time and love. Segregating generic [SPI | FC | SAS | iSCSI | ATA | RAID | ...] transport layer code into their own modules -- the transport classes and associated libs -- will point out the sore spots where scsi-ml needs changes. This approach also implies we improve the existing scsi-ml where needed, rather than the proposed "if legacy, let it bitrot" approach.

Jeff

#47 lore raw
In reply to Luben Tuikov
Quoted 18 lines · Luben Tuikov
Quoted 6 lines · Jeff Garzik
Quoted 1 line · Luben Tuikov

MPT-based drivers + James Bottomley's "transport attributes"

Quoted 8 lines

You continue to fail to see that a transport class is more than just transport attributes.

You continue to fail to see that working on transport class support IS a transport layer, that includes management.

Is you don't understand this fundamental stuff, how can we expect you to get it right?

From what I see, because of its *layering* position

JB's "transport attributes" cannot satisfy open transport.

Quoted 9 lines

The reason is that MPT-based drivers indeed do need host template in the LLDD.

Open Transport (SBP/USB/SAS) do not, since the chip is only an interface to the transport.

The host template is implemented by a transport layer, say USB Storage or the SAS Transport Layer.

I think I can understand some of Luben's reasons for the layering. We are facing similar problems with software iscsi and hw iscsi. For software iscsi it would be nice to consolodate some of the common software iscsi code into a layer or lib. Following Luben's path for example our queuecommand would be:

scsi-ml -> scsi_host_template->queuecommand -> iscsi transport common queuecommand (do things like check session state, that we are not in session level recovery, scsi to iscsi pdu prep like setting the data direction, and other iSCSI PDU prep) -> iscsi_transport module -> iscsi_transport->queuepdu (you can probably reccomend a better name) -> tcp, sctp, iwarp, or some iSCSI HW that exposes a iSCSI interface rather than SCSI (note that qla4xxx would use its own scsi_host_template->queuecommand since it does not expose enough iSCSI internals for it to be useful to plug in here).

However, HW iscsi cards and software/partial-software iscsi solutions can share code for things like session and connection creation where we would have transport class lib functions: iscsi_add_session/iscsi_remove_session which both the HW iscsi cards like qla4xxx and software/partial-software iscsi drivers could use to setup things like a common sysfs representation. iscsi_add_session/iscsi_remove_session would work similar to the fc_rport code where the midlayer doesn't really know they exist (this is similar to our session and connection code today but it is bound to the scsi host which prevents qla4xxx from using it).

Is the direction we are going where iscsi would have to put the "iscsi transport common queuecommand" code into something similar to libata? Or
is it that Luben's transport layer code is performing something
different than software/partial-software iscsi?

#48 lore raw
In reply to Andre Hedrick
Quoted 6 lines · Andre Hedrick

I stated I would help with SAS adoption because there is a SAS-Transport model. I asked about a possible libadaptec + libsas, and still waiting to see if you and adaptec are up for the task. Right now the only path open is the one Jeff Garzik is putting forward along with James and Christop. I have a vested interest in seeing SAS-Transport, otherwise I would have cut and run a long time ago.

Hi Andre,

Let me know if this satisfies:

The infrastructure is broken into
* SAS LLDD,
* SAS Layer.

The SAS LLDD does phy/OOB management, and generates SAS events to the SAS Layer. Those events are *the only way* a SAS LLDD communicates with the SAS Layer. If you can generate 2 types of event, then you can use this infrastructure. The first two are, loosely, "link was severed", "bytes were dmaed". The third kind is "received a primitive", used for domain revalidation.

A SAS LLDD should implement the Execute Command SCSI RPC and at least one SCSI TMF (Task Management Function), in order for the SAS Layer to communicate with the SAS LLDD.

The SAS Layer is concerned with
* SAS Phy/Port/HA event management (LLDD generates, SAS Layer processes),
* SAS Port management (creation/destruction),
* SAS Domain discovery and revalidation,
* SAS Domain device management,
* SCSI Host registration/deregistration,
* Device registration with SCSI Core (SAS) or libata (SATA/PI), and
* Expander management and exporting expander control to user space.

The SAS Layer uses the Execute Command SCSI RPC, and the TMFs implemented by the SAS LLDD in order to manage the domain and the domain devices.

For details please see drivers/scsi/sas/README.

The SAS Layer represents the SAS domain in sysfs. For each object represented, its parent is the physical entity it attaches to in the physical world. So in effect, kobject_get, gets the whole chain up on which that object depends on.

In effect, the sysfs representation of the SAS domain(s) is what you'd see in the physical world.

Hot plugging and hot unplugging of devices, domains and subdomains is supported. Repeated hot plugging and hot unplugging is also supported, naturally.

SAS introduces a new physical entity, an expander. Expanders are _not_ SAS devices, and thus are _not_ SCSI devices. Expanders are part of the Service Delivery Subsystem, in this case SAS.

Expanders are controlled using the Serial Management Protocol (SMP). Complete control is given to user space of all expanders found in the domain, using an "smp_portal". More of this in the second and third email in this series.

A user space program, "expander_conf.c" is also presented to show how one controls expanders in the domain. It is located here:
drivers/scsi/sas/expanders_conf.c

Thank you,
Luben

Quoted 25 lines

These long email threads where everyone is shout from the top of their hill never wins anything. After a while the hill becomes flat (from all the stomping), and you become old and tired.

LSI pointed out they mask there SAS in firmware and make it show up in a scsi-like or scsi state. They also pointed out other vendors have taken this road. Even if Adaptec did not go this way in hardware, there still has to be a way to map into SCSI ... sheesh this is Adaptec known for SCSI.

Just an FYI, would suggest you cool your heels and listen for the quiet responses. There is more heat than light right now; maybe this thread will offset some of the cost in the energy criss. Will pass on advice handed to me (when I was a maintainer) relax and listen, nobody is out to get you (and they were right).

Cheers,

Andre

PS I didn't listen to that advice back then, don't make the same mistake.

#49 lore raw
In reply to Willy Tarreau
Quoted 9 lines · Willy Tarreau

There are people buying expensive hardware. The type of hardware that costs $100k for just a few CPUs. Those people don't buy "the Adaptec XXX which runs best with Red Hat Enterprise" nor the "LSI YYY which runs best with Solaris", they buy a few $100k systems with 3 TB disk to store their monthly logs. They cannot even imagine that the hardware in the $100k system will not be fully supported by some recent OS, that's just plain silly. The OS cost is just a water drop in the middle of this. When they install Solaris on it because they're used to run it, it just works. When I sometimes just show

Quoted 8 lines

them that Solaris is not adequate for daily greps in logs, and I show them how faster it is on a $1k Linux machine in the next rack, they feel they can switch to it easily. But if they discover that this system does not correctly support their $100k hardware, do you know which one was is the crap ? the $300 Red Hat or the $100k hardware ? [ oh, BTW, I forgot to tell you : they say "Red Hat", and not "Linux" because it does not sound like what they long considered an OS for tamagotchis - to use their own words - :-( ]

Yes, all true.

Sadly, most developers here do not _use_ Linux, or are at least shielded from using Linux, in a _business_.

All the while, Linux _development_, seems to follow some kind "yours/mine", "gimme that/take that" kindergarten kind of way. The reason I'm saying this is that _every_ successful entity (person, corporation, etc) knows that in order to _survive_ it needs to _quickly adapt to new things_: new technologies, new trends, new fads, etc.

But eventually, when entities get too successful, they get _complacent_ (with themselves) and turning _away_ from their younger style of functioning (of absolving everything in order to get successful in the first place).

All this, of course, it the _natural_ way of history. We see it when studying History, and we see it every day when reading the Technology section of our favourite publication.

Some companies are _fiercly_ trying to beat this _natural_ course of History, into turning 180 degrees from their mindset every single year in order to chase the latest technology, the latest fad, in order to please customers and stay on top.

I wish Linux would return to its roots.

Quoted 5 lines

And when they go to adaptec site to find latest drivers and they only find patches which forces them to find another Linux to install the sources and guess how to patch and build, do you know which OS they consider as hobbyist's ? The Red Hat ! (which they can call "Linux" again then).

OMG, "hobbyist" -- this so perfectly describes it! LOL

So now, if there is any coroprate management from RH here reading this they'd take heed in this.

Linux _development_ needs to catch up to Linux _deployment_.

Currently they are two different worlds.

Quoted 5 lines

Hans Reiser once said that every software needs a complete rewrite every 3 or 5 years (I don't precisely remember). I tend to agree with him. Maybe it's time to completely rewrite the SCSI subsystem, but maybe it will be too long, too risky and not worth the effort. Maybe it can simply coexist with another new subsystem. This is what

Now _this_ is a smart suggestion: it wouldn't break legacy hardware _and_ it would give Linux SCSI a fresh start.

Next year, your new serverboard wouldn't have any of those old cumbersome storage chips to worry about. It would have only one storage chip which could do SAS and SATA and that'd be that. Why would anyone need this fat, old semanticaly overloaded, SPI-centric SCSI Core?

Quoted 8 lines

Luben, you seem to have enough knowledge to draw both diagrams side-by-side :
- the T10 spec with colors on the boxes covered by your work
- the Linux view of SCSI

Perhaps we will see that current code can be extended without too much work, or perhaps we will see that it's definitely a dead end and that a new design will help a lot.

Yes, I'll get that jpg and try to color it, but there's also a lot of other components (Interconnect, SDS, Application Client) which are not visible in this interconnect.

I'll try to get something descriptive.

Quoted 6 lines

Anyway Luben, I fear that for some time, you'll have to provide pre-patched sources as well as binary kernels to enterprise customers who still try to get Linux working in production. I hope that this sad experience will not discourage other vendors from trying to take the opensource wagon, as it clearly brings fuel to closed-source drivers at the moment (no need to argue).

Foremost, this experience reminds other vendors that Linux _development_ model is _not_ en par with their Linux _deployment_ model (i.e. for a business).

Many things are left to the whim of developers whose educational and technical background could be in question especially when your only communication with them is via email.

I mean -- I don't even know the _age_ ballpark of most developers here. (Other than ones I've seen at OLS.) For all I know I could be having a discussion with a 9 year old kid, repeating SAM and SPC references over and over again.

I just don't see the technologically savvy and _open_ community here.

Quoted 2 lines

Eventhough I don't have SAS, I sincerely hope that a quick and smart solution will be found which keeps everyone's pride intact, as it

I'm not shoving my solution down the throats of LSI or James or Christoph. Why?
- because the technologies are different,
- beacause I'm following a SAM model, they are not.
- and because I'm not changing anybody else's code but integrating with it.

(Jeff, I know that on the 3rd point, you'd say "That's the problem, you should be improving SCSI Core", and I know that if I had been changing other people's code, you'd say "You should not change other people's code", so it's a win-win-manipulative situation for you. I'm aware of that, spare your keystrokes.)

This is all _fine_ with me as long as they are not shoving down my throat their solution.

I wonder the pride to technological merit ratio in Linux SCSI.

Quoted 2 lines

seems to matter much those days. In an ideal situation, 2.7 would have been opened for a long time,

Maybe things are slowing down for Linux? Attitude? Complacency? History? Who knows?

Quoted 2 lines

and Luben's code would have been
discussed to death as a new development needed to be merged before

We did have a Storage BOF (Birds Of Feather) at the Ottawa Linux Symposium (OLS) in July this year. It was called "SAS" and someone made me do the presentation. Drawing on a white board several layers and how they communicate with each other, how things work, why they work the way they work, how they are shown and represented and why.

The response I got from James and Chritsoph was:
"The sysfs tree would be too deep."

The next day I learned that such argument is bogus and a sysfs tree can be as deep as the representation calls for.

So you see, _this_ is where we started -- with _this_ kind of argument: "The sysfs tree would be too deep."

BTW, James already had already had my code for about two weeks before OLS.

Luben

#50 lore raw
Quoted 6 lines · Luben Tuikov

All the while, Linux _development_, seems to follow some kind "yours/mine", "gimme that/take that" kindergarten kind of way. The reason I'm saying this is that _every_ successful entity (person, corporation, etc) knows that in order to _survive_ it needs to _quickly adapt to new things_: new technologies, new trends, new fads, etc.

The core problem is that a SAM-friendly path to SAS has already been chosen -- transport classes -- and your driver isn't following this path.

If we choose a new path every six months, we'll never arrive at the destination.

Quoted 6 lines

Some companies are _fiercly_ trying to beat this _natural_ course of History, into turning 180 degrees from their mindset every single year in order to chase the latest technology, the latest fad, in order to please customers and stay on top.

I wish Linux would return to its roots.

Linux today is the most successful its ever been. This system, however strange it may seem, does work.

Quoted 7 lines
Quoted 5 lines

Hans Reiser once said that every software needs a complete rewrite every 3 or 5 years (I don't precisely remember). I tend to agree with him. Maybe it's time to completely rewrite the SCSI subsystem, but maybe it will be too long, too risky and not worth the effort. Maybe it can simply coexist with another new subsystem. This is what

Quoted 8 lines

Now _this_ is a smart suggestion: it wouldn't break legacy hardware _and_ it would give Linux SCSI a fresh start.

Next year, your new serverboard wouldn't have any of those old cumbersome storage chips to worry about. It would have only one storage chip which could do SAS and SATA and that'd be that. Why would anyone need this fat, old semanticaly overloaded, SPI-centric SCSI Core?

The rest of the Linux-SCSI devs are trying to make it less SPI-centric.
Rather than just complain, we're doing something about it.

Quoted 7 lines

Foremost, this experience reminds other vendors that Linux _development_ model is _not_ en par with their Linux _deployment_ model (i.e. for a business).

Many things are left to the whim of developers whose educational and technical background could be in question especially when your only communication with them is via email.

Background is irrelevant. Only results matter. Linux is a meritocracy.

Quoted 7 lines

I'm not shoving my solution down the throats of LSI or James or Christoph. Why?
- because the technologies are different,
- beacause I'm following a SAM model, they are not.
- and because I'm not changing anybody else's code but integrating with it.

Quoted 5 lines

(Jeff, I know that on the 3rd point, you'd say "That's the problem, you should be improving SCSI Core", and I know that if I had been changing other people's code, you'd say "You should not change other people's code", so it's a win-win-manipulative situation for you. I'm aware of that, spare your keystrokes.)

Spare me your paranoia. I've been 100% honest with you in every email I've written.

You -should- change other people's code. That's how Linux gets better.

When I chose a better path for libata's error handling, the first step in that process was changing the locking, and modifying almost every $!#$@! SCSI driver in the kernel. Rather than forever complaining about an outdated SCSI layer, I stepped up and fixed things.

Quoted 6 lines
Quoted 2 lines

seems to matter much those days. In an ideal situation, 2.7 would have been opened for a long time,

Maybe things are slowing down for Linux? Attitude? Complacency? History? Who knows?

SCSI work is speeding up. The SCSI core has come a -long- way in the past couple years. 2.6.x SCSI is light years ahead of 2.4.x SCSI.

Jeff

#51 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 6 lines · Luben Tuikov

All the while, Linux _development_, seems to follow some kind "yours/mine", "gimme that/take that" kindergarten kind of way. The reason I'm saying this is that _every_ successful entity (person, corporation, etc) knows that in order to _survive_ it needs to _quickly adapt to new things_: new technologies, new trends, new fads, etc.

Quoted 2 lines

The core problem is that a SAM-friendly path to SAS has already been chosen -- transport classes -- and your driver isn't following this path.

Man you never stop do you?

I repeat again (I'll cut and paste this):

When JB's transport classes were introduced there was NO MENTIONING of SAS. THE REASON THEY WERE INTRODUCED INTO LINUX BY JB IS TO ACCOMODATE MPT-based SOLUTIONS FROM TWIDDLING WITH IOCTLS!

How do I know this: simple: JB's "transport attributes" have NOTHING to do with SAM.

They break the layering architecture for one, and are ATTRIBUTE EXPORTING FACILITY for another.

I understand that you want to preserve your friend's bal^w^w^wpride but, lets face it:
I do not try to shove my solution down JB's throat.

As I've said many times: they are different due to the *technology they represent*, which differs in implmentation, and they can coexist!

If you can say this statement:
"The core problem is that a SAM-friendly path to SAS
has already been chosen -- transport classes -- and your driver isn't following this path."

This means that you have NO CLUE ABOUT SAS or SAM!

I certainly hope that things would improve once you start reading specs and talking to the engineers who designed BCM8603. (If you are still going to write their driver for them.)

Quoted 2 lines

If we choose a new path every six months, we'll never arrive at the destination.

No one is choosing a new path every six months.

And this isn't a new path for _everybody_ to follow, it is only for LLDD who need a transport layer to drive the transport they expose an interface to.

I'm _not_ choosing a new path. No one is required to "follow" this. This is just _technology_ for LLDD who _need_ a management layer, and who _cannot_ inteface with a high level such as SCSI Core.

Quoted 2 lines

Linux today is the most successful its ever been. This system, however strange it may seem, does work.

And as you can see, Linux today is the most anal retentive as it has ever been (e.g. SAS, reiser4, and other (revolutionary) technologies).

Remember, you can only go _down_ from the top. So please do not say
"Linux is the most successful it's ever been."

It's too immature as it means that it would either go down or that it cannot become even _more_ successful.

Quoted 2 lines

The rest of the Linux-SCSI devs are trying to make it less SPI-centric.
Rather than just complain, we're doing something about it.

Oh this is such a political sap, Jeff -- I cannot believe you're actually saying this.

Who are you pleasing? Your management?

I've been asking for movement AWAY from HCIL from early 2003, when you were writing libata, remember? Or do you want a link to marc.10east.com?

Stop this political BS sap "we're doing something about it", please.

I suggested native scsi_target support so long ago, only to get snuffed at.

Quoted 5 lines
Quoted 3 lines

Many things are left to the whim of developers whose educational and technical background could be in question especially when your only communication with them is via email.

Background is irrelevant. Only results matter. Linux is a meritocracy.

Single line statements like this with 0-content, FUD-like, only for you to reply right away, do not _contribute_ anything.

You're just throwing sand in the eyes of managament reading this.

Quoted 4 lines

Spare me your paranoia. I've been 100% honest with you in every email I've written.

You -should- change other people's code. That's how Linux gets better.

I doubt you've ever been honest with me.* The reason is that you are trying to push down my throat JB's "transport classes", all the while you're saying I'm supposed to change other people's code?

Just see how you started this email (above).

So please, don't try to get out of any situation turning 180 degrees around.

* Well, maybe you _are_ 100% honest with me. Maybe you really do believe that your friend JB's "transport _attributes_" code has anything to do with SAM.

Quoted 4 lines

When I chose a better path for libata's error handling, the first step in that process was changing the locking, and modifying almost every $!#$@! SCSI driver in the kernel. Rather than forever complaining about an outdated SCSI layer, I stepped up and fixed things.

I flipped a card: "You'll get a promotion soon!".

What else can I reply to a self-gratifying statment like this?

Can I reply with someting like: "See my SAS stuff -- how it truthfully represents the whole domain and gives complete control of it over to user space? See?"

Quoted 2 lines

SCSI work is speeding up. The SCSI core has come a -long- way in the past couple years. 2.6.x SCSI is light years ahead of 2.4.x SCSI.

Well, this only tell you the (bad) state of affairs of _2.4.x_ SCSI. This does _not_ tell you the state of affairs of 2.6.x SCSI.

2.6.x SCSI is light years _behind_ SAM.

Luben

#52 lore raw
Quoted 2 lines · Luben Tuikov

of SAS. THE REASON THEY WERE INTRODUCED INTO LINUX BY JB IS TO ACCOMODATE MPT-based SOLUTIONS FROM TWIDDLING WITH IOCTLS!

Wrong. This shows you fundamentally don't understand transport classes at all.

AFAIK, the first transport class was FC, for qla2xxx.

Read the code to see how FC avoids the SPI-centric scan -- an example of transport independence.

Quoted 5 lines

How do I know this: simple: JB's "transport attributes" have NOTHING to do with SAM.

They break the layering architecture for one, and are ATTRIBUTE EXPORTING FACILITY for another.

Transport class == transport layer. Eventually this will sink in.

Transport class allows for complete transport independence, be it SAS, FC, iSCSI, or other.

Quoted 6 lines

And as you can see, Linux today is the most anal retentive as it has ever been (e.g. SAS, reiser4, and other (revolutionary) technologies).

Remember, you can only go _down_ from the top. So please do not say
"Linux is the most successful it's ever been."

We've still got all that Microsoft and old-Unix marketshare to steal :)

Quoted 10 lines

It's too immature as it means that it would either go down or that it cannot become even _more_ successful.

Quoted 2 lines

The rest of the Linux-SCSI devs are trying to make it less SPI-centric.
Rather than just complain, we're doing something about it.

Oh this is such a political sap, Jeff -- I cannot believe you're actually saying this.

I'm merely stating I'm submitting patches to clean up SCSI core. Others have submitted far more patches than I. And further patches to SCSI core are needed to properly integrate SAS as a transport completely independent from SPI. I'm going to be putting time and effort into moving the SCSI core away from SPI, so that SAS can be properly integrated.

All I've seen from you is
(a) complaints that the SCSI core is too SPI-centric
(b) a solution that does nothing to fix this

Quoted 1 line

Who are you pleasing? Your management?

My goal is Linux. Always has been. I put quality of Linux code, and giving features to Linux users, above all else. Have been doing so regardless of who employs me, for many years now.

Maybe one day I will be independently wealthy, be a completely independent Linux maintainer, and then people will have to find something other than Red Hat as the reason for why their code is receiving criticism.

Quoted 4 lines

I doubt you've ever been honest with me.* The reason is that you are trying to push down my throat JB's "transport classes", all the while you're saying I'm supposed to change other people's code?

To get a fully SPI-independent SCSI core, we must change other people's code. That's the way Linux works. We evolve the existing code.

Jeff

#53 lore raw
Quoted 6 lines · Jeff Garzik
Quoted 2 lines · Luben Tuikov

of SAS. THE REASON THEY WERE INTRODUCED INTO LINUX BY JB IS TO ACCOMODATE MPT-based SOLUTIONS FROM TWIDDLING WITH IOCTLS!

Quoted 7 lines

Wrong. This shows you fundamentally don't understand transport classes at all.

AFAIK, the first transport class was FC, for qla2xxx.

Read the code to see how FC avoids the SPI-centric scan -- an example of transport independence.

And it shows that you do not understand SAM.

How do I know this: simple: JB's "transport attributes" have NOTHING to do with SAM.

They break the layering architecture for one, and are ATTRIBUTE EXPORTING FACILITY for another.

I understand that you want to preserve your friend's bal^w^w^wpride but, lets face it:
I do not try to shove my solution down JB's throat.

As I've said many times: they are different due to the *technology they represent*, which differs in implmentation, and they can coexist!

If you can say this statement:
"The core problem is that a SAM-friendly path to SAS
has already been chosen -- transport classes -- and your driver isn't following this path."

This means that you have NO CLUE ABOUT SAS or SAM!

I certainly hope that things would improve once you start reading specs and talking to the engineers who designed BCM8603. (If you are still going to write their driver for them.)

Quoted 11 lines
Quoted 5 lines

How do I know this: simple: JB's "transport attributes" have NOTHING to do with SAM.

They break the layering architecture for one, and are ATTRIBUTE EXPORTING FACILITY for another.

Transport class == transport layer. Eventually this will sink in.

Transport class allows for complete transport independence, be it SAS, FC, iSCSI, or other.

Nah -- all FUD.

See how you're talking general stuff. See how I talk specifics:

The host template was introduced to satisfy SPI only LLDD which was everything available at that time and SAM didn't exist yet.

Over time it was enlarged to accomodate others and all LLDD implemented it and simulated SPI centric view.

Now, you have a storage chip on a pci device which is NOT a host template material.

I.e. the LLDD is a _PCI_ device driver, NOT SCSI!

It exports only a SAM section 5, 6 and 7 view of
the Service Delivery Subsystem and interconnect.

It does _not_ export anything "scsi host" like.

For this reason you _need_ a management layer on top, but _below_ SCSI Core, since that management layer is _transport_ specific _and_ SCSI Core should be completely _unaware_ of the transport!

Then _this_ transport layer, presents things
to the SCSI Core as "scsi host" material.

Among the many, lets take for example this
member of the struct scsi_host_template
along with the comment:

/*
* In many instances, especially where disconnect / reconnect are
* supported, our host also has an ID on the SCSI bus. If this is
* the case, then it must be reserved. Please set this_id to -1 if
* your setup is in single initiator mode, and the host lacks an
* ID.
*/
int this_id;

SPI-centric?

How about this from scsi_host:

	/*
	 * These three parameters can be used to allow for wide scsi,
	 * and for host adapters that support multiple busses
	 * The first two should be set to 1 more than the actual max id
	 * or lun (i.e. 8 for normal systems).
	 */
	unsigned int max_id;
	unsigned int max_lun;
	unsigned int max_channel;

And I can continue to give examples of this for as many lines are in the header files of Linux SCSI.

Now Jeff will say: "Then submit patches to fix this."

Quoted 2 lines

I'm merely stating I'm submitting patches to clean up SCSI core. Others have submitted far more patches than I. And further patches to SCSI

I've also submitted patches to improve SCSI Core. Those improvements came directly from my own mini-SCSI Core implementation of iSCSI Target. For example, using the slab cache for scsi commands.

Thanks to Doug L, and Andi K, they made it in, if it had been left to James Bottomley, they'd never be in.

Then I continued to post RFCs and various other suggestions, like 64 bit LUN, elimination of HCIL -- all shot down by your friends in the community.

This was back when you had just started working on libata.

So please spare me the political sap -- I've tears in my eyes already.

Quoted 1 line

core are needed to properly integrate SAS as a transport completely

Stop this FUD man -- it integrates right now:
http://linux.adaptec.com/sas/

Quoted 2 lines

independent from SPI. I'm going to be putting time and effort into moving the SCSI core away from SPI, so that SAS can be properly integrated.

So you are going to give all currently existsing legacy LLDD a heart attack?

Or are you going to create new functionality as I had outlined here:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112794008820004&w=2

You know, "struct scsi_domain_device", proper LU
scannint, etc.

Quoted 2 lines

All I've seen from you is
(a) complaints that the SCSI core is too SPI-centric

I've been wanting to change this since 2003. I even wrote an email that I wanted to completely rewrite SCSI Core for 2.7 in 2003. See this email.
http://marc.theaimsgroup.com/?l=linux-scsi&m=104508658212335&w=2

Sadly as most discussions in linux-scsi nothing materializes, patches get dropped, etc, etc, et.

Quoted 1 line

(b) a solution that does nothing to fix this

But it gets you one step closed to it. It merges _cleanly_, people can use it get comfortable with it and eventually things else where would improve as people get comfortable with it.

Quoted 6 lines

My goal is Linux. Always has been. I put quality of Linux code, and giving features to Linux users, above all else. Have been doing so regardless of who employs me, for many years now.

Maybe one day I will be independently wealthy, be a completely independent Linux maintainer, and then people will have to find

Jeff, if you think that if one day if you became independently wealthy you'd be an independent Linux maintainer, or do _any_ kind of work, you need to mature a bit more. I _guarantee_ you that in 5 years you'd think differently.

Independently wealthy people start doing charity work and then they use that to get into politics, in order to obtain that which lacks from just having a ton of money:
power.

Luben

Quoted 18 lines

something other than Red Hat as the reason for why their code is receiving criticism.

Quoted 4 lines

I doubt you've ever been honest with me.* The reason is that you are trying to push down my throat JB's "transport classes", all the while you're saying I'm supposed to change other people's code?

To get a fully SPI-independent SCSI core, we must change other people's code. That's the way Linux works. We evolve the existing code.

Jeff

#54 lore raw
In reply to Luben Tuikov
Quoted 4 lines · Luben Tuikov

The reason I'm saying this is that _every_ successful entity (person, corporation, etc) knows that in order to _survive_ it needs to _quickly adapt to new things_: new technologies, new trends, new fads, etc.

[...]

Quoted 1 line

I wish Linux would return to its roots.

I don't know how things were when you started using linux but linux has never been about that AFAIK. People usually buys windows licenses for that ;)

Quoted 3 lines

here. (Other than ones I've seen at OLS.) For all I know I could be having a discussion with a 9 year old kid, repeating SAM and SPC references over and over again.

Oh well. May be Christoph and James are behaving like 9-years-old kids, but if that's true you're NOT BEING DIFFERENT than them if you look a bit to your mails.

You can be pretty sure that at this stage everyone is looking you as a 9-years-old kid who is raving because his mother don't buy him a candy. Maybe they're looking james and christoph int he same way aswell, but that's their issue.

#55 lore raw
In reply to Luben Tuikov

On Thu, 2005-09-29 at 10:33 -0400, Luben Tuikov wrote:
[...]

Quoted 1 line

Linux _development_ needs to catch up to Linux _deployment_.

That is probably the root and single cause of quality problems in
companies: Deployment folks (read: sales) set the delivery date (and get the bonus for selling) and the rest (read: tech folks) have to follow, no matter what (and get the blame for being late and buggy). Or why do you think that MSFT has such quite crappy software?

Quoted 1 line

Currently they are two different worlds.

ACK - in the commercial world (and the bigger the company the worse because sales people are far more distant from the tech people).

[ software rewrite ]

Quoted 10 lines
Quoted 1 line

Maybe it can simply coexist with another new subsystem. This is what

Now _this_ is a smart suggestion: it wouldn't break legacy hardware _and_ it would give Linux SCSI a fresh start.

Next year, your new serverboard wouldn't have any of those old cumbersome storage chips to worry about. It would have only one storage chip which could do SAS and SATA and that'd be that. Why would anyone need this fat, old semanticaly overloaded, SPI-centric SCSI Core?

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it makes sense (and you - as the maintainer - accept their patches). And in a few years the "old" SCSI core fades out as legacy drives fade out (or they will happily coexist forever).
The point is: If *you* want it that way, *you* must go that way (and do not expect others to do it just that *you* get *your* driver merged). You are the maintainer of the new stuff and (almost) everything will work as you want.
It might not be the cleanest or most elegant solution in the world, but if it works, who cares and why?
Where is now the real problem?
I can't see one.

Bernd

Signature · 3 lines
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services
#56 lore raw
Quoted 3 lines · Bernd Petrovitsch

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it

SAS is ultimately SCSI. I'll just have to write my own SCSI core. _We_ together can do this in parallel to the old SCSI Core.

This is the whole idea.

Quoted 1 line

makes sense (and you - as the maintainer - accept their patches). And in

You see, at my age and my situation, I no longer see this as "my balls - your balls". What matters to me is good design, quality code, customer satisfaction, bottom line.

E.g. I'm quite a liberal person and I wouldn't block or stop new technologes from going into Linux on the basis and merit of my not understanidn that particular new technology.

The bottom line is not "my balls - your balls" but the wide spread use of Linux and "storage OS of choice". Not "hobbyist OS of choice" and not "let me play Robin Hood".

Quoted 2 lines

a few years the "old" SCSI core fades out as legacy drives fade out (or they will happily coexist forever).

Yep, I've been saying this since 2002. On the linux-scsi ML.

Quoted 4 lines

The point is: If *you* want it that way, *you* must go that way (and do not expect others to do it just that *you* get *your* driver merged). You are the maintainer of the new stuff and (almost) everything will work as you want.

And this is the problem: *you* and "the community" see things in *this* way: "your balls - my balls", "yours/mine".

While I see things like this: new technology, absolve, use, move on.

As to your comment above, it's not about how *I* see things. It's about how things _actually_ *are*:
http://www.t10.org/ftp/t10/drafts/sam4/sam4r03.pdf

Quoted 2 lines

It might not be the cleanest or most elegant solution in the world, but if it works, who cares and why?

Turn the table around: can _I_ pose this question to JB and Christoph?

(since they are the ones who think this of SAM/SPC)

Quoted 2 lines

Where is now the real problem?
I can't see one.

Me neither.

Luben

#57 lore raw
Quoted 8 lines · Luben Tuikov
Quoted 2 lines · Bernd Petrovitsch

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it

SAS is ultimately SCSI. I'll just have to write my own SCSI core. _We_ together can do this in parallel to the old SCSI Core.

You should have stated this plainly, from the start.

If you want to do your own SCSI layer, you need to do it at the block layer rather than poking around drivers/scsi/

Jeff

#58 lore raw
Quoted 9 lines · Jeff Garzik
Quoted 7 lines · Luben Tuikov
Quoted 2 lines · Bernd Petrovitsch

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it

Quoted 8 lines
Quoted 2 lines

SAS is ultimately SCSI. I'll just have to write my own SCSI core. _We_ together can do this in parallel to the old SCSI Core.

You should have stated this plainly, from the start.

If you want to do your own SCSI layer, you need to do it at the block layer rather than poking around drivers/scsi/

So now you are saying that I should _not_ poke at drivers/scsi? (as I haven't done)

Are you going to make up your mind?

Luben

#59 lore raw
Quoted 19 lines · Luben Tuikov
Quoted 17 lines · Jeff Garzik
Quoted 10 lines · Luben Tuikov
Quoted 2 lines · Bernd Petrovitsch

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it

SAS is ultimately SCSI. I'll just have to write my own SCSI core. _We_ together can do this in parallel to the old SCSI Core.

You should have stated this plainly, from the start.

Quoted 7 lines
Quoted 1 line

If you want to do your own SCSI layer, you need to do it at the block layer rather than poking around drivers/scsi/

So now you are saying that I should _not_ poke at drivers/scsi? (as I haven't done)

Are you going to make up your mind?

Are you: are you going to rewrite the SCSI core, or work to improve the existing one?

Your choice, not mine. Your time, not mine.

Jeff

#60 lore raw
In reply to Luben Tuikov
Quoted 16 lines · Luben Tuikov
Quoted 15 lines · Jeff Garzik
Quoted 9 lines · Luben Tuikov
Quoted 2 lines · Bernd Petrovitsch

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it

SAS is ultimately SCSI. I'll just have to write my own SCSI core. _We_ together can do this in parallel to the old SCSI Core.

You should have stated this plainly, from the start.

Quoted 7 lines
Quoted 2 lines

If you want to do your own SCSI layer, you need to do it at the block layer rather than poking around drivers/scsi/

So now you are saying that I should _not_ poke at drivers/scsi? (as I haven't done)

Are you going to make up your mind?

Luben, I think you are missing the distinction being made here and that distinction is very important.

It is *critical* to hardware vendors, to the linux community, and even at this point to some of your competitors in the HBA space that we find the best solutions that work well for *everyone*. The more often we wind up with independent, unique stacks and unrelated methods and mechanisms in the kernel, the more work we all have to do to support Linux. If every HBA out there that thought there were following a new and interesting technology and were going to code to the perfect ISO or T10 or IETF layering model, the linux kernel would be one huge, inconsistent, bloated stinking mess for the rest of us to support.

Worse, all of our customers would see different behaviors in semantics, functionality, and support matrices for every HBA, hardware component, or combination of platform/HBA/storage subsystem.

I believe that for you personally to find success in the Linux development community (much as you probably do in the standards or HBA community) is that you have to talk off your personal hat, you have to take off your employer's hat, and you must put on the Linux community hat for a while and see through their eyes.

In this case, Jeff and others are providing two options with a common goal. The common goal is to increase the overall amount of commonality and common code in Linux in this case.

You can do that two ways: Start with a new SCSI core library and show with code how it works for multiple HBA vendors (this includes working with your competitors!) OR help to evolve the current code to better address your needs while not breaking the needs of other consumers.

Either approach is valid. You can start sending patches to update the SCSI core code to simplify your driver and fit with the current community model, OR you can put forward not just a model but the libraries and proof-of-concepts (possibly while working with other HBA vendors) in the form of Linux kernel code to demonstrate the viability of a new stack which satisfies the wider community goals of ease of maintainence and ease of understanding over time.

In general, if you think you see a contraction coming from the community, I'd encourage you to look more closely - there are some strong guiding principles for the community.

I suggest reading through a few of these resources which might help:

http://lists.osdl.org/pipermail/os_drivers/attachments/20050426/261c7d9d/DeviceDriverDevelopmentPlan-v.02-0001.pdf

http://www.madrone.org/mentor/linux-mentoring.pdf

I'm sure others have simmilar materials floating around. You are not the first person to suffer from culture shock here but the sooner you understand the goals of the community and show how to help meet those goals (hopefully with code to substantiate your goals, and the ability to incorporate feedback and give feedback) the sooner we'll have a working driver in mainline.

gerrit

#61 lore raw
In reply to Luben Tuikov
Quoted 1 line · Luben Tuikov

On 09/29/05 11:17, Bernd Petrovitsch wrote:

[...]

Quoted 7 lines
Quoted 2 lines

Then submit your driver as a (separate) block device in parallel to the existing SCSI subsystem. People will use it for/with other parts if it

SAS is ultimately SCSI. I'll just have to write my own SCSI core. _We_ together can do this in parallel to the old SCSI Core.

This is the whole idea.

The question is: Who starts and leads seriously this effort (and takes in the course others with him)?
Just telling others where to go and waiting until they carry you there usually doesn't succeed if you are not the boss of them (and/or they are free to leave at any time without significant punishment).

Quoted 1 line
Quoted 1 line

makes sense (and you - as the maintainer - accept their patches). And in

[...]

Quoted 4 lines
Quoted 2 lines

a few years the "old" SCSI core fades out as legacy drives fade out (or they will happily coexist forever).

Yep, I've been saying this since 2002. On the linux-scsi ML.

Perhaps speaking is not enough and work should follow?
All people who really do the work like those others standing beneath (possibly doing their own thing) and telling them how to do their own work best.

Quoted 2 lines

And this is the problem: *you* and "the community" see things in *this* way: "your balls - my balls", "yours/mine".

It's at most (and actually exactly) "my work - your work", not "my balls
- your balls" (or "code" or whatever).
If you want to play "our work" (read: team[0] work), than you have to cope with others (and they with you), their - probably historically grown - design (even if it is wrong), etc.
If this doesn't work (and ATM I have this impression) for whatever reason, the second step is "my work, your work".
And if two (or more) people have different design opinions (and different opinions about "quality" and/or "correct vs wrong" - I can't decide since I have virtually no knowledge about SCSI core internals, discussions on the Linux-SCSI-ML, etc. to decide - not even for me -, who is "right" and/or "wrong" in which aspect or in general), it comes down to "better the not-so-good design and working code than the best design and no code".
So just copy the old core, throw out what you don't want, need and/or like and voila. If it *is* "better", it will succeed and people will come and help.
Of course it is probably more work in the short and in the long run to maintain a separate block driver for SAS storage, but it is at least a possible solution.
Perhaps all relevant people will see that the difference is small enough to converge to some point in between.

Bernd

[0]: Not in the ironic interpretation in German which translates roughly
to "great, another one does it".

Signature · 3 lines
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services
#62 lore raw
Quoted 2 lines · Bernd Petrovitsch

different opinions about "quality" and/or "correct vs wrong" - I can't decide since I have virtually no knowledge about SCSI core internals,

Ok.

Quoted 4 lines

discussions on the Linux-SCSI-ML, etc. to decide - not even for me -, who is "right" and/or "wrong" in which aspect or in general), it comes down to "better the not-so-good design and working code than the best design and no code".

That sounds very fine, _but_ "the community" isn't a "corporation".

"The community" is by far and wide very close friends, so if you point out to one of them that his code is wrong, even if all other see that you're indeed correct, no one would say anything.

Why? Because he doesn't want to same thing done to him.

So it doesn't matter who is right or who is wrong. What matters is who has political power to have it his way.

Quoted 3 lines

So just copy the old core, throw out what you don't want, need and/or like and voila. If it *is* "better", it will succeed and people will come and help.

Blesses art thou, who believeth.

I wish it worked like this, I really wished. Sadly its doesn' work like this.

James is a strong political figure. He keeps people who he thinks know more than him at bay. I can quote several names here, who are active and some who were active at one point or another, all very well versed in the T10 ways, but it wouldn't be fare to them.

So what you have is a strong political game: they don't care what is right or wrong, they'll implement it the way _they_ think is right, in effect alongside _their_ code.

I'm not sure how much History the readers have studied, but such politics have always yielded to extinction.

The reason is _not_ because you reject something, but because you end up always doing it always _your_ way. Eventually you become unfit to compete when the world has changed _so much_ around you, that "your way" is no longer relevant and the change to make you fit is so radical, that it is impossible to do.

So you see, it is _not_ about accepting code, it is about accepting _ideas_ and _innovation_.

James can still do everything _his_ way. The question is how many _years_ would this be relevant?

Quoted 2 lines

[0]: Not in the ironic interpretation in German which translates roughly
to "great, another one does it".

Yes, but in "the community" people want "great, he does it _my_ way".

Luben

#63 lore raw
Quoted 5 lines · Luben Tuikov

So you see, it is _not_ about accepting code, it is about accepting _ideas_ and _innovation_.

James can still do everything _his_ way. The question is how many _years_ would this be relevant?

Is your cat sleeping on your underscore key?

Joel

Signature · 11 lines
"There is no more evil thing on earth than race prejudice, none at 
 all.  I write deliberately -- it is the worst single thing in life 
 now.  It justifies and holds together more baseness, cruelty and
 abomination than any other sort of error in the world." 
        - H. G. Wells

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127
#64 lore raw
In reply to Luben Tuikov

Luben,

I'd really prefer if you'd just stop on your tirade and just send in a 10 line patch for the existing linux SCSI subsystem to fix something you think is wrong.

Code talks, bullshit walks.

Sure, Linux SCSI might not be ideal, but how many people do you know have SAS storage on their home PCs right now? Heck, I don't have SATA or PIV on my home system!

And as a customer of Adaptec hardware, I'm getting to the point of seriously taking my money and going elsewhere for my storage needs. If you are a general example of how Adaptec works with its customers, then I want nothing to do with you or your products.

Sure, I know you think Linux is stuck in the past, so help us move to the future in small baby steps. It doesn't require big huge leaps like you're proposing. I mean, have you actually tried to your old legacy SCSI controllers in a system with your new hardware? How did your testing go?

Now I'm not a programmer, and I can't talk like one, but in my real life job I'm a SysAdmin and knowing what I know about Adaptec's interactions on this list will certainly color my perceptions of your hardware and trying to make it work with my company.

John

#65 lore raw

Well said John!

For that matter get us a driver for the embedded 7902 (is that the one?
I forget now) with host raid support.

Quoted 35 lines · John Stoffel

Luben,

I'd really prefer if you'd just stop on your tirade and just send in a 10 line patch for the existing linux SCSI subsystem to fix something you think is wrong.

Code talks, bullshit walks.

Sure, Linux SCSI might not be ideal, but how many people do you know have SAS storage on their home PCs right now? Heck, I don't have SATA or PIV on my home system!

And as a customer of Adaptec hardware, I'm getting to the point of seriously taking my money and going elsewhere for my storage needs. If you are a general example of how Adaptec works with its customers, then I want nothing to do with you or your products.

Sure, I know you think Linux is stuck in the past, so help us move to the future in small baby steps. It doesn't require big huge leaps like you're proposing. I mean, have you actually tried to your old legacy SCSI controllers in a system with your new hardware? How did your testing go?

Now I'm not a programmer, and I can't talk like one, but in my real life job I'm a SysAdmin and knowing what I know about Adaptec's interactions on this list will certainly color my perceptions of your hardware and trying to make it work with my company.

John
-
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/

#66 lore raw
In reply to Luben Tuikov
Quoted 7 lines · Luben Tuikov
Quoted 4 lines · Andre Hedrick

Luben, I have a vested interest in seeing SAS run via SCSI. So this means you have one ex-demi-god from the world of maintainers looking to pull you have towards the current path and open to ideas and willing to back a better design and push it.

Ok, thanks Andre. Much appreciated.

Luben,

I have a vested interest in the improvement of the Linux SCSI Core and wider adoption and support for SATA II and SAS controllers with their associated domains and transport.

Quoted 4 lines

You are the first person to back me up _publicly_. Now if we can find a person from "the community" to do that, and get all the other people who've written me _privately_, we'd be in good shape.

Proving a better design with a migration path for integration is the key for success; however, I am not the person to be the political voice in the process. People will disagree in the process and the only counter to remove blockage/adoption is in code.

James is king of the hill, and is reasonable to a point. James also follows a model of generalization v/s specific design. Argh, this is not going to be an easy one to explain or back away from now. Erm, inclusive API design is where I am wanting to go with this thought.

Have you and company considered the approach of mapping to a library of sorts?

Cheers,

Andre

#67 lore raw
Quoted 3 lines · Andre Hedrick

I have a vested interest in the improvement of the Linux SCSI Core and wider adoption and support for SATA II and SAS controllers with their associated domains and transport.

Us and other companies too.

Quoted 2 lines

Proving a better design with a migration path for integration is the key for success; however, I am not the person to be the political voice in the

Yes, _it is_ the key to success.

Quoted 1 line

James is king of the hill, and is reasonable to a point. James also

Which "hill" is the question. If he were reasonable, he'd understand that the two technologies _are_ completely different and distinct and he'd not try to shove HIS solution down my throat. Just as I do not shove my solution in his throat.

The whole point is that MPT-based (IOP on package) solutions _do not_ need a Transport Layer, since that Transport Layer _is_ already present: in the firmware _and_ access to it is _firmware_ dependent.

All the while open transport solutions (ours and apparently Broadcoms') _expose_ the whole infrastructure and _give_ you the chip as an interface to the interconnect. So you actually _need_ a transport management layer. Now that transport management layer sits _below_ SCSI Core and SCSI Core is _unaware_ of the transport.

Quoted 3 lines

follows a model of generalization v/s specific design. Argh, this is not going to be an easy one to explain or back away from now. Erm, inclusive API design is where I am wanting to go with this thought.

You can have inclusive API design for chips like AIC-94xx and BCM8603, because they <see paragraph above>.

MPT-based ones <see paragraph above> would also use inclusive design _for MPT-based chips_.

Quoted 2 lines

Have you and company considered the approach of mapping to a library of sorts?

Hmm, it is not a library.

It is a layer, again, because of what the chip actually is, and because of what it implements.

Take a look at the announcement text, I do give some description there and in the code the drivers/scsi/sas-class/README file describes the event/managment infrastructure. Also you can take a look at the code.
http://linux.adaptec.com/sas/

What you'll see in the code is:

hardware implementation (interconnect, SAM 4.15, 1.3)
firmware implementation (interconnect, SDS, SAM 4.6, 1.3)
LLDD (SAM, section 5, 6, 7)
Transport Layer (SAM 4.15, SAS)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

A very nice explanation in latest SAM4r03,
section 4.15 The SCSI model for distributed communications.

Now for MPT based solutions you have:

LLDD (SAM, section 5, 6, 7)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

You see? No Transport Layer between LLDD and SCSI Core! Why? Because all this work is done in FIRMWARE!

That is, the LLDD exports the LUs right into SCSI Core, So in effect there is _no_ need for a software Transport Layer.

Can we have a video/tele conference on this?

Luben

#68 lore raw
Quoted 6 lines · Luben Tuikov

hardware implementation (interconnect, SAM 4.15, 1.3)
firmware implementation (interconnect, SDS, SAM 4.6, 1.3)
LLDD (SAM, section 5, 6, 7)
Transport Layer (SAM 4.15, SAS)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

Transport class + libsas achieves this.

Maybe I will have to demonstrate using code...

Jeff

#69 lore raw
Quoted 11 lines · Jeff Garzik
Quoted 6 lines · Luben Tuikov

hardware implementation (interconnect, SAM 4.15, 1.3)
firmware implementation (interconnect, SDS, SAM 4.6, 1.3)
LLDD (SAM, section 5, 6, 7)
Transport Layer (SAM 4.15, SAS)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

Transport class + libsas achieves this.

This is *WRONG*. (see below)

And it doesn't "achieve" this. Stop the FUD.
There is a _reason_ why it is the way it is.

Quoted 1 line

Maybe I will have to demonstrate using code...

Jeff,

There is a _reason_ why technical people separate concepts in _layers_.

There is a _reason_ why technical people use Object Oriented Paradigms describing models and design.

Do you know _what_ that reason is?

Or should I leave you to "demonstrate with code"?

Seeing that you keep _persisting_ in your ways,
I'll leave it for you to "enrich" Linux SCSI in
your "demonstrate with code".

Luben

#70 lore raw
In reply to Luben Tuikov
Quoted 23 lines · Luben Tuikov
Quoted 2 lines · Andre Hedrick

Have you and company considered the approach of mapping to a library of sorts?

Hmm, it is not a library.

It is a layer, again, because of what the chip actually is, and because of what it implements.

Take a look at the announcement text, I do give some description there and in the code the drivers/scsi/sas-class/README file describes the event/managment infrastructure. Also you can take a look at the code.
http://linux.adaptec.com/sas/

What you'll see in the code is:

hardware implementation (interconnect, SAM 4.15, 1.3)
firmware implementation (interconnect, SDS, SAM 4.6, 1.3)
LLDD (SAM, section 5, 6, 7)
Transport Layer (SAM 4.15, SAS)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

Quoted 2 lines

A very nice explanation in latest SAM4r03,
section 4.15 The SCSI model for distributed communications.

BTW, Linux' implementations of transports like USB storage and SBP-2 have always been similarly layered. (Actually they come with at least one more layer between LLDD and SCSI core.) Needless to say that these transports need their specific managing infrastructures. So this layering is not at all new to Linux.

Quoted 8 lines

Now for MPT based solutions you have:

LLDD (SAM, section 5, 6, 7)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

You see? No Transport Layer between LLDD and SCSI Core! Why? Because all this work is done in FIRMWARE!

Signature · 3 lines
Stefan Richter
-=====-=-=-= =--= ===-=
http://arcgraph.de/sr/
#71 lore raw
Quoted 10 lines · --- Stefan Richter
Quoted 9 lines · Luben Tuikov

What you'll see in the code is:

hardware implementation (interconnect, SAM 4.15, 1.3)
firmware implementation (interconnect, SDS, SAM 4.6, 1.3)
LLDD (SAM, section 5, 6, 7)
Transport Layer (SAM 4.15, SAS)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

Quoted 8 lines
Quoted 2 lines

A very nice explanation in latest SAM4r03,
section 4.15 The SCSI model for distributed communications.

BTW, Linux' implementations of transports like USB storage and SBP-2 have always been similarly layered. (Actually they come with at least one more layer between LLDD and SCSI core.) Needless to say that these transports need their specific managing infrastructures. So this layering is not at all new to Linux.

True, true.

But those subsystems are shielded from SCSI Core. Plus SCSI Core is managed by people unaware of SAM or the layering infrastructure.

Luben

Quoted 14 lines
Quoted 8 lines

Now for MPT based solutions you have:

LLDD (SAM, section 5, 6, 7)
SCSI Core (SAM section 4,5,8)
Commmand Sets (SAM section 1)

You see? No Transport Layer between LLDD and SCSI Core! Why? Because all this work is done in FIRMWARE!

Signature · 3 lines
Stefan Richter
-=====-=-=-= =--= ===-=
http://arcgraph.de/sr/
#72 lore raw
In reply to Luben Tuikov
Quoted 2 lines · Luben Tuikov

When it comes down to it SCSI Core is 20 years behind and thus Linux Storage is 20 years behind.

Hmm.. 20 years ago I was hooking Fujitsu Super-Eagles to Sun3/280 servers. If you're going to claim that the current SCSI core is *that* far behind, you're going to have to back it up. Remember that making exaggerated claims is a good way to make people not listen to the *rest* of your message.

Seen in include/scsi/scsi.h:

/*
* FIXME: bit0 is listed as reserved in SCSI-2, but is
* significant in SCSI-3. For now, we follow the SCSI-2
* behaviour and ignore reserved bits.
*/

So obviously, it's at least the number of years since SCSI-3 was defined,
but no more than the time since SCSI-2. According to http://home.comcast.net/~SCSIguy/SCSI_FAQ/scsifaq.html
SCSI-2 devices started showing up in 1988, and X3.131-1994 came out in 1994.
1996 saw the first SCSI-3 proposals.

I'll give you *one* decade, but not two. :)

#73 lore raw
Quoted 20 lines · On 09/28/05 12:30, [email protected] wrote:
Quoted 2 lines · Luben Tuikov

When it comes down to it SCSI Core is 20 years behind and thus Linux Storage is 20 years behind.

Hmm.. 20 years ago I was hooking Fujitsu Super-Eagles to Sun3/280 servers. If you're going to claim that the current SCSI core is *that* far behind, you're going to have to back it up. Remember that making exaggerated claims is a good way to make people not listen to the *rest* of your message.

Seen in include/scsi/scsi.h:

/*
* FIXME: bit0 is listed as reserved in SCSI-2, but is
* significant in SCSI-3. For now, we follow the SCSI-2
* behaviour and ignore reserved bits.
*/

Quoted 6 lines

So obviously, it's at least the number of years since SCSI-3 was defined,
but no more than the time since SCSI-2. According to http://home.comcast.net/~SCSIguy/SCSI_FAQ/scsifaq.html
SCSI-2 devices started showing up in 1988, and X3.131-1994 came out in 1994.
1996 saw the first SCSI-3 proposals.

I'll give you *one* decade, but not two. :)

Ok, I'll take that.

BTW, I was referring to the _architecture_ of SCSI Core.

It hasn't seen any _innovation_ for the last 5 years as far as SCSI or Storage is concerned.

Luben

#74 lore raw
In reply to Luben Tuikov
Quoted 6 lines · Luben Tuikov
Quoted 1 line · Jeff Garzik

* Avoids existing SAS code, rather than working with it.

No, it's the _other_ way around. There is NO existing SAS code.

Incorrect, just look in the latest upstream kernel.

Quoted 4 lines
Quoted 1 line

* Avoids existing SATA code, rather than working with it.

FUD! Why? It does _not_ use SATA code at all.

That's the problem.

Quoted 4 lines

Why? SATA devices are discovered on the domain, but there is _no_ SATL in the kernel to represent them.

And libata is _not_ SATL. The reasons are that

libata-scsi.c is the SAT translation layer.

Quoted 6 lines
Quoted 2 lines

* Avoids (rather than fix) several SCSI core false dependencies on HCIL. Results in code duplication and/or avoidance of needed code.

No, not true. It _integrates_ with SCSI Core. The sad truth is that SCSI Core knows only HCIL.

That's something that needs fixing, for SAS.

Quoted 6 lines

I repeat again that I had this code _long_ before Christoph ever dreamt up SAS. And he got my code via James B sometime before OLS this year. I think he got it July 12, 2005.

The question is: why didn't _he_ use the solution already available?

Because it has the problems listed time and again.

Quoted 9 lines

You have to understand the differences between MPT and open transport architecture.

At some point I thought Christoph seemed to have understood it. Now I'm not sure any more.

Now since the open transport solution completely encompasses and _absolves_ MPT, it is not hard for an MPT driver to generate a bunch of events and use that infrastructure.

The SAS transport class is designed to support both firmware-based devices like MPT, and non-firmware devices such as Adaptec.

Sure it might need patches -- send patches, work with people, rather than ignoring existing work.

Quoted 14 lines
Quoted 1 line

* Maintainer reminds me of my ATA mentor, Andre Hedrick: knows his shit, but has difficulties working with the community. May need a filter if we want long term maintenance to continue.

I take offence in your liking me to Andre -- I don't know Andre personally, but is seems that you're expressing personal opinion against him, against me and labeling me in some way.

I take offence in that, Jeff.

Why are you making this a _political_ and personal game?

All you're doing is trying to aliken me to someone and brandish me as someone I'm not.

Quoted 6 lines

This is rude, offensive and done in desperation.

Shall we concentrate on the _technical_ part of
the argument?

I repeat again: _technical_ part of the argument.

We've been over the technical stuff time and again. That's the maintainer problem. We need someone who will listen to the community.

Quoted 4 lines
Quoted 1 line

Easy path: make Adaptec's solution a block driver, which allows it to sidestep all the "doesn't play well with others" issues. Still an

What _exactly_ does it mean "don't play well with others"?

It means not taking feedback, and working around rather than with the SCSI core.

Quoted 10 lines
Quoted 1 line

Adaptec-only solution, but at least its in a separate playpen.

I'm sure James Bottomley will move from SCSI Core to the block layer as he did for IDR. hehehe :-)

And no, it is not Adaptec's only solution. Your BCM8603 SAS LLDD when you write it could use it without any problems.

Quoted 6 lines
Quoted 1 line

Hard path: Update the SCSI core and libata to work with SATA+SAS hardware such as Adaptec's.

Cannot do for libata -- ever. Why? You know best: because libata uses direct access to the hardware! There is no layered architecture.

Then you don't understand the ->qc_{prep,issue} hooks. That should get you 90% of the way there, if not 99%.

Quoted 2 lines

What you need to do is to write a SATL layer, just as you can see in SAT-r6, page 2, Figure 3. I'm on top of this already.

Re-read libata-scsi.c, and submit any patches you feel are needed.

Quoted 2 lines

The code doesn't alter Linux SCSI or anyone else's behaviour. It only _provides_ SAS support to the kernel.

That's one of the problems: It should update the SCSI core.

Jeff

#75 lore raw
Quoted 5 lines · Jeff Garzik
Quoted 3 lines · Luben Tuikov

On 09/27/05 17:55, Jeff Garzik wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

* Avoids existing SAS code, rather than working with it.

No, it's the _other_ way around. There is NO existing SAS code.

Incorrect, just look in the latest upstream kernel.

Yes, because it was Christoph's code submitted right after I submitted and JB took his code right in.

Again, I had the infrastructure ready _before_ OLS.

Quoted 1 line

libata-scsi.c is the SAT translation layer.

Not quite.

It has potential to become SATL but at its current form it cannot be:

int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))

{
	struct ata_port *ap;
	struct ata_device *dev;
	struct scsi_device *scsidev = cmd->device;

	ap = (struct ata_port *) &scsidev->host->hostdata[0];

If I want to use that I have to _simulate_ ata_port. Furthermore, scsidev->host->hostdata may not point to ata_port for SATA devices over a different transport.

Ideally SATL is just a _data transformation function_ and getting to the ATA device is transport dependent.

Jeff, would you be accepting patches?

Quoted 5 lines
Quoted 2 lines

No, not true. It _integrates_ with SCSI Core. The sad truth is that SCSI Core knows only HCIL.

That's something that needs fixing, for SAS.

Would you be accepting patches for the creation,
and use of "struct scsi_domain_device { ... }"?

This would be a "SCSI Device with a Z Port". Z could be target or initiator (most likely just T).

Then for each scsi_domain_device, SCSI Core does REPORT LUNS and then INQUIRY for each LU it found.

The old (current) code would still say as is, unchanged, since it supports older, broken hardware.

Would you be accepting patches for this?

Quoted 9 lines
Quoted 6 lines

I repeat again that I had this code _long_ before Christoph ever dreamt up SAS. And he got my code via James B sometime before OLS this year. I think he got it July 12, 2005.

The question is: why didn't _he_ use the solution already available?

Because it has the problems listed time and again.

What problems when there was no other code around.

Look at it this way: _their_ code doesn't integrate with ours. See?

I simply cannot take an argument like this:
"Because it has the problems listed time and again."

You have to be specific.

Quoted 2 lines

The SAS transport class is designed to support both firmware-based devices like MPT, and non-firmware devices such as Adaptec.

No, it never has been. It is an _attribute_ exporting framework only.

If you understood how different those architectures are, you'd understand what I mean.

Quoted 2 lines

Sure it might need patches -- send patches, work with people, rather than ignoring existing work.

I do not _know_ how to consolidate the completely broken "design" set forth by JB and company.

It is _completely_ not to SAM spec.

Exporting attributes from MPT-based drivers is not the same as managing a transport.

I repeat again:
* MPT _hides_ the transport and the managment
of the transport from you -- so in effect there is nothing to manage.
* MPT gives you Logical Units to work with, NOT ever domain devices or anyhing domain like.
* MPT gives you a SAM/SPC hook to hook _right_ into SCSI Core.

_This_ is why their LLDD _can_ use the host template.

But an AIC-94xx and BCM8603 _is_ NOT a scsi_host material. It is just an interface to the interconnect.

To convince yourself of this: take a look at the _members_ of the scsi host/scsi host template: nothing in that structure is presented in the chip -- UNLIKE old Parallel SCSI device drivers.

The scsi host template was written to cater to _old_ (then new) Parallel SCSI drivers! Times have changed! Time to evolve.

Quoted 2 lines

We've been over the technical stuff time and again. That's the
maintainer problem.

No we haven't been over the technical stuff time and again.

Quoted 1 line

We need someone who will listen to the community.

I bet you're melting people's hearts when they read this.

So to summarize for corporate management what you're saying here is:
- you're saying that I do not listen to "the community",
- you're saying that I'm an _outsider_ to "the community",
- you're saying that I'm no good to work with you, since you are part of that community but not me.

That is you cannot take it that someone will tell "the community" anything. "The community" knows all and it knows best.

So in effect there are no good and knowlegable engineers anywhere but in the "Linux community".

That is there is no people with new ideas, better ideas, innovative ideas, more knowlege about certain subject matter, _anywhere_ but in the "Linux community".

So in effect, there will never be an "outsider" who will come in to the "linux community" and change things around, no fresh ideas, no better (right?) way to do things.

"The community" is not going to listen to anyone but only to already politically established members on _any_ subject matter, even technical, even from "outsiders" who work with the technology every day.

Quoted 5 lines
Quoted 1 line

What _exactly_ does it mean "don't play well with others"?

It means not taking feedback, and working around rather than with the SCSI core.

So does this mean, that if I submit patches "fixing" (oops, not meant to hurt anyone's bal^w^w^wpride) SCSI Core, they will be accepted.

Or do you want me to do "your way of SAS"? Maybe JB et al, should write the "Linux SAS spec" and then we can recommend this to T10.org, so they can scrap their version and use "the community's"?

I hear there was such a suggestion on the mailing lists for ATA and T13.org, but I'm sure I'm misunderstanding something here as usual.

Quoted 2 lines

Then you don't understand the ->qc_{prep,issue} hooks. That should get you 90% of the way there, if not 99%.

But I have to simulate struct ata_port, Jeff.

Which isn't so bad, but speaks about the design.

Quoted 4 lines
Quoted 2 lines

What you need to do is to write a SATL layer, just as you can see in SAT-r6, page 2, Figure 3. I'm on top of this already.

Re-read libata-scsi.c, and submit any patches you feel are needed.

Will do.

Quoted 5 lines
Quoted 2 lines

The code doesn't alter Linux SCSI or anyone else's behaviour. It only _provides_ SAS support to the kernel.

That's one of the problems: It should update the SCSI core.

Thank you for admitting this -- you're the first and only member of "the community" (since I'm not a member apparently) to admit this.

Luben

#76 lore raw
Quoted 2 lines · Luben Tuikov

Ideally SATL is just a _data transformation function_ and getting to the ATA device is transport dependent.

Incorrect. It needs to issue multiple ATA commands to emulate a single SCSI command, cache some state, and other details. Not purely data transformation.

Quoted 1 line

Jeff, would you be accepting patches?

Yes. That's what I mean when I say "submit patches".

Quoted 13 lines
Quoted 5 lines
Quoted 2 lines

No, not true. It _integrates_ with SCSI Core. The sad truth is that SCSI Core knows only HCIL.

That's something that needs fixing, for SAS.

Would you be accepting patches for the creation,
and use of "struct scsi_domain_device { ... }"?

This would be a "SCSI Device with a Z Port". Z could be target or initiator (most likely just T).

Quoted 7 lines

Then for each scsi_domain_device, SCSI Core does REPORT LUNS and then INQUIRY for each LU it found.

The old (current) code would still say as is, unchanged, since it supports older, broken hardware.

Would you be accepting patches for this?

What needs to happen is that SPI-specific stuff in the SCSI core needs to be moved to SPI-specific transport code.

Then all transports will be at an equal level, and the SCSI core will be fully transport-agnostic.

Quoted 13 lines
Quoted 9 lines
Quoted 6 lines

I repeat again that I had this code _long_ before Christoph ever dreamt up SAS. And he got my code via James B sometime before OLS this year. I think he got it July 12, 2005.

The question is: why didn't _he_ use the solution already available?

Because it has the problems listed time and again.

What problems when there was no other code around.

Quoted 7 lines

Look at it this way: _their_ code doesn't integrate with ours. See?

I simply cannot take an argument like this:
"Because it has the problems listed time and again."

You have to be specific.

"time and again" means that we have been specific multiple times. Re-read your emails from James and Christoph :)

Quoted 8 lines
Quoted 1 line

The SAS transport class is designed to support both firmware-based devices like MPT, and non-firmware devices such as Adaptec.

No, it never has been. It is an _attribute_ exporting framework only.

If you understood how different those architectures are, you'd understand what I mean.

James is wrong here. The "transport class" in reality winds up as a transport lib, in addition to simply exporting attributes.

There will always be functions that are common to a transport. Christoph calls this "libsas", since software-driven SAS implementations will share this transport code, but not necessarily all SAS implementations (MPT, qla etc.).

Quoted 7 lines
Quoted 1 line

Sure it might need patches -- send patches, work with people, rather than ignoring existing work.

I do not _know_ how to consolidate the completely broken "design" set forth by JB and company.

It is _completely_ not to SAM spec.

Not true. Just because SCSI core lacks an explicit "execute SCSI command" RPC hook, does not imply that that capability is non-existent.

Stare at the Scsi_Host_Template some more and you'll see it.

Quoted 11 lines

Exporting attributes from MPT-based drivers is not the same as managing a transport.

I repeat again:
* MPT _hides_ the transport and the managment
of the transport from you -- so in effect there is nothing to manage.
* MPT gives you Logical Units to work with, NOT ever domain devices or anyhing domain like.
* MPT gives you a SAM/SPC hook to hook _right_ into SCSI Core.

Quoted 4 lines

_This_ is why their LLDD _can_ use the host template.

But an AIC-94xx and BCM8603 _is_ NOT a scsi_host material. It is just an interface to the interconnect.

A scsi_host is simply a container. You're being too literal.

Quoted 6 lines

To convince yourself of this: take a look at the _members_ of the scsi host/scsi host template: nothing in that structure is presented in the chip -- UNLIKE old Parallel SCSI device drivers.

The scsi host template was written to cater to _old_ (then new) Parallel SCSI drivers! Times have changed! Time to evolve.

Yes. We need to evolve the SCSI core to separate out SPI-specific pieces, to make it more transport-agnostic.

Quoted 6 lines
Quoted 1 line

We've been over the technical stuff time and again. That's the maintainer problem.

No we haven't been over the technical stuff time and again.

Quoted 8 lines
Quoted 1 line

We need someone who will listen to the community.

I bet you're melting people's hearts when they read this.

So to summarize for corporate management what you're saying here is:
- you're saying that I do not listen to "the community",

correct

Quoted 1 line

- you're saying that I'm an _outsider_ to "the community",

irrelevant

Quoted 2 lines

- you're saying that I'm no good to work with you, since you are part of that community but not me.

irrelevant

Quoted 10 lines

That is you cannot take it that someone will tell "the community" anything. "The community" knows all and it knows best.

So in effect there are no good and knowlegable engineers anywhere but in the "Linux community".

That is there is no people with new ideas, better ideas, innovative ideas, more knowlege about certain subject matter, _anywhere_ but in the "Linux community".

Quoted 8 lines

So in effect, there will never be an "outsider" who will come in to the "linux community" and change things around, no fresh ideas, no better (right?) way to do things.

"The community" is not going to listen to anyone but only to already politically established members on _any_ subject matter, even technical, even from "outsiders" who work with the technology every day.

overreaction

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

What _exactly_ does it mean "don't play well with others"?

It means not taking feedback, and working around rather than with the SCSI core.

So does this mean, that if I submit patches "fixing" (oops, not meant to hurt anyone's bal^w^w^wpride) SCSI Core, they will be accepted.

James and Christoph have been asking you to submit patches for a long time now.

Quoted 4 lines

Or do you want me to do "your way of SAS"? Maybe JB et al, should write the "Linux SAS spec" and then we can recommend this to T10.org, so they can scrap their version and use "the community's"?

You're over-reacting.

Quoted 6 lines
Quoted 1 line

Then you don't understand the ->qc_{prep,issue} hooks. That should get you 90% of the way there, if not 99%.

But I have to simulate struct ata_port, Jeff.

Which isn't so bad, but speaks about the design.

You have to provide a means to submit ATA commands and receive results, no more or less.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

The code doesn't alter Linux SCSI or anyone else's behaviour. It only _provides_ SAS support to the kernel.

That's one of the problems: It should update the SCSI core.

Thank you for admitting this -- you're the first and only member of "the community" (since I'm not a member apparently) to admit this.

James, Christoph and the rest of linux-scsi have been saying this over and over again.

You need to update the SCSI core properly, rather than working around it.

Everybody knows the SCSI core is too SPI-centric, and you have been given a recipe for fixing this.

Jeff

#77 lore raw
Quoted 9 lines · Jeff Garzik
Quoted 2 lines · Luben Tuikov

Ideally SATL is just a _data transformation function_ and getting to the ATA device is transport dependent.

Incorrect. It needs to issue multiple ATA commands to emulate a single SCSI command, cache some state, and other details. Not purely data transformation.

Yes, this is right and I'm aware of it. I really, really, had some wishful thinking.

Quoted 5 lines

What needs to happen is that SPI-specific stuff in the SCSI core needs to be moved to SPI-specific transport code.

Then all transports will be at an equal level, and the SCSI core will be fully transport-agnostic.

Yeah, I've been saying this for ages:
Read half way through my message from 2003 here:
http://marc.theaimsgroup.com/?l=linux-scsi&m=104257405408078&w=2

Quoted 2 lines

"time and again" means that we have been specific multiple times. Re-read your emails from James and Christoph :)

So you're saying that they are right and I'm wrong, and I should listen to them.

Which is _exactly_ what I've been pointing out:
"the community" thinks that only they are the experts on the planet regarding new technologies, thus they are right, engineers "outside the community" are dead wrong and they should listen to what "the community" says.

Shall I point out a multitude of emails whereby some "community members" go out on _technology_ public lists and start a flame war, until they are warned to behave or be expelled? Is this what you mean the "they" are right, and "we" are wrong?

The community calls specs "techno-gibberish" and think that LUNs can be u64, that REQUEST SENSE clears ACA, and that HCIL is here for ever, etc.

Excuse me if I simply ignore their "SCSI storage advice".

Quoted 5 lines
Quoted 2 lines

If you understood how different those architectures are, you'd understand what I mean.

James is wrong here.

Either you meant "Luben" here or you've been banned forever from "the community" and your patches would never ever be accepted.

Quoted 5 lines

The "transport class" in reality winds up as a transport lib, in addition to simply exporting attributes.

There will always be functions that are common to a transport. Christoph calls this "libsas", since software-driven SAS implementations

Look at the pictures (since its easier) in SAM/SAS/SPC. It is not a "lib" it is a _layer_ in its own right, which is completely and fully implemented in the FW of an MPT-like (IOP in package) solution.

Access to _anything_ transport specific is _FIRMWARE_ specific and doesn't yield to unification as does a SAS Transport Layer management.

The only unification you get is: "Here is a LLDD giving you LUs to manage, and oh yeah, here is some FIRMWARE dependent way to peek at the transport and transport attributes".

Quoted 9 lines
Quoted 4 lines

I do not _know_ how to consolidate the completely broken "design" set forth by JB and company.

It is _completely_ not to SAM spec.

Not true. Just because SCSI core lacks an explicit "execute SCSI command" RPC hook, does not imply that that capability is non-existent.

Stare at the Scsi_Host_Template some more and you'll see it.

Well, then, how can I reply to this?

I say "1+1=2", you say "Not true. 1+1=3."

Show me the equivalence between the Scsi_Host_Template and SAM, give me section references as well.

What I meant is that the place and design of JB's transport attribute "blessing" is completely out of whack for SAM abiding implementation.

Look at the pictures: the transport layer is _below_ the application client and the application client is completely unaware of the transport.

Now lets translate (http://www.t10.org/scsi-3.gif) :

    Command set drivers  <-->  sd, st, etc (application client)
                SAM/SPC  <-->  SCSI Core to be
        Transport layer  <-->  SAS (all others implemented in LLDD)
                    SDS  <-->  LLDD + Firmware
           Interconnect  <-->  Firmware + hardware.

It is _this_ SAM architecture which allows you to say, send SATA commands over SAS links (via STP), and do other interesting things.

I guarantee you that any _new_ SCSI transport would yield to a Transport Layer abstraction just as SAS does.

Since, this is what SAM _is_ (all about).

I don't mind James Bottomley entertaining his "transport attribute" code, as long as he's not shoving it down my throat (again because of pictures like the one above).

As I've said before both implementations are _orthogonal_ and can coexist.

Quoted 4 lines
Quoted 2 lines

But an AIC-94xx and BCM8603 _is_ NOT a scsi_host material. It is just an interface to the interconnect.

A scsi_host is simply a container. You're being too literal.

By "too literal" do you mean "following specs too closely", or do you mean "being realistic without tweaking things".

Quoted 2 lines

Yes. We need to evolve the SCSI core to separate out SPI-specific pieces, to make it more transport-agnostic.

2003:
http://marc.theaimsgroup.com/?l=linux-scsi&m=104257405408078&w=2

Quoted 2 lines

James and Christoph have been asking you to submit patches for a long time now.

Not patches to fix SCSI Core or to get "struct scsi_domain_device" into SCSI Core or to get 64 bit LUNs into the kenrel.

They've been asking me for me to abandon the complete SAS transport layer which I have, which is 1000 years ahead of theirs and ahead of SCSI Core and to go and work on LSI's and on "transport attributes".

Sorry, but SAM seems to disagree.

Quoted 2 lines

James, Christoph and the rest of linux-scsi have been saying this over and over again.

They've never said it: why else do you think we do not have 64 bit LUNS or why else do you think we have HCIL in SCSI Core.

Instead, what James does is he goes off to implement "transport attributes" and to submit patches to IDR after I myself submitted patches to IDR? Why? So he can undermine my patches? Well, as you can see I completely removed IDR's usage from aic94xx. Now "the community" is happy.

Quoted 2 lines

Everybody knows the SCSI core is too SPI-centric, and you have been given a recipe for fixing this.

I "have been given recipe for fixing this"?

Are you all right Jeff?

Yep, the recipe was given to me by people who think that we should stay with HCIL, who have found purpose for the "second channel" in HCIL, who think that REQUEST SENSE clears ACA, who think that 64 bit LUN is just a waste, and so forth with their antics.

So excuse me if I don't see or recognize the recipe given to me. Mind pointing out a link? This way we will have a hard coded evidence of what that recipe is. And we can see the exact steps it outlines.

Thank you,
Luben

#78 lore raw
Quoted 3 lines · Luben Tuikov

The community calls specs "techno-gibberish" and think that LUNs can be u64, that REQUEST SENSE clears ACA, and that HCIL is here for ever, etc.

How many times do we have to repeat "HCIL dependencies should get moved to SPI-specific transport code" before you listen?

Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

If you understood how different those architectures are, you'd understand what I mean.

James is wrong here.

Either you meant "Luben" here or you've been banned forever from "the community" and your patches would never ever be accepted.

Quit being silly. I meant what I wrote. Though it turns out that your interpretation of James's ideas was incorrect. James agrees that "transport code" includes both lib and attributes, not attributes only.

Quoted 3 lines

What I meant is that the place and design of JB's transport attribute "blessing" is completely out of whack for SAM abiding implementation.

By focusing on attributes, you miss the big picture. This is not about attributes.

Quoted 11 lines

Look at the pictures: the transport layer is _below_ the application client and the application client is completely unaware of the transport.

Now lets translate (http://www.t10.org/scsi-3.gif) :

    Command set drivers  <-->  sd, st, etc (application client)
                SAM/SPC  <-->  SCSI Core to be
        Transport layer  <-->  SAS (all others implemented in LLDD)
                    SDS  <-->  LLDD + Firmware
           Interconnect  <-->  Firmware + hardware.
Quoted 8 lines

It is _this_ SAM architecture which allows you to say, send SATA commands over SAS links (via STP), and do other interesting things.

I guarantee you that any _new_ SCSI transport would yield to a Transport Layer abstraction just as SAS does.

Since, this is what SAM _is_ (all about).

This is fundamental: SCSI specs dictate how this functions, not necessarily what Linux code looks like.

The big picture is

	device class <-> transport class

and everything falls out from there, including SAM.

Moving SPI (parallel SCSI, for those unfamiliar with the acronym) to transport-specific code will eliminate legacy assumptions that you keep complaining about.

Linux is about getting things done, not being religious about specifications. You are way too focused on the SCSI specs, and missing the path we need to take to achieve additional flexibility.

With Linux, it's all about evolution and the path we take.

Quoted 4 lines

I don't mind James Bottomley entertaining his "transport attribute" code, as long as he's not shoving it down my throat (again because of pictures like the one above).

As long as you think James is merely talking about attributes, you're just not getting it.

Transport classes are an abstraction which allows SAS to exist as a peer to parallel SCSI, FC, and other acronyms.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

But an AIC-94xx and BCM8603 _is_ NOT a scsi_host material. It is just an interface to the interconnect.

A scsi_host is simply a container. You're being too literal.

By "too literal" do you mean "following specs too closely", or do you mean "being realistic without tweaking things".

I mean, paying too much attention to specs at the expense of understanding how Linux code needs to be shaped.

Quoted 10 lines
Quoted 1 line

James and Christoph have been asking you to submit patches for a long time now.

Not patches to fix SCSI Core or to get "struct scsi_domain_device" into SCSI Core or to get 64 bit LUNs into the kenrel.

They've been asking me for me to abandon the complete SAS transport layer which I have, which is 1000 years ahead of theirs and ahead of SCSI Core and to go and work on LSI's and on "transport attributes".

They are asking you to help with the task of eliminating SPI dependencies in the core, so that SAS can exist as a peer to other transports.

Quoted 6 lines
Quoted 1 line

James, Christoph and the rest of linux-scsi have been saying this over and over again.

They've never said it: why else do you think we do not have 64 bit LUNS or why else do you think we have HCIL in SCSI Core.

Repeating myself (and others): everybody wants HCIL stuff to move to SPI-specific transport code.

That is the task that must be completed BEFORE transport layer for SAS can be fully merged.

Quoted 5 lines
Quoted 1 line

Everybody knows the SCSI core is too SPI-centric, and you have been given a recipe for fixing this.

I "have been given recipe for fixing this"?

Quoted 7 lines

Are you all right Jeff?

Yep, the recipe was given to me by people who think that we should stay with HCIL, who have found purpose for the "second channel" in HCIL, who think that REQUEST SENSE clears ACA, who think that 64 bit LUN is just a waste, and so forth with their antics.

For the nth time, everybody agrees HCIL should move to transport-specific code.

And from past threads, everybody seems OK with moving to a 64-bit lun representation.

Quoted 4 lines

So excuse me if I don't see or recognize the recipe given to me. Mind pointing out a link? This way we will have a hard coded evidence of what that recipe is. And we can see the exact steps it outlines.

For the nth time: http://marc.theaimsgroup.com/?l=linux-scsi&m=112487476527470&w=2

Jeff

#79 lore raw
Quoted 5 lines · Jeff Garzik

Linux is about getting things done, not being religious about specifications. You are way too focused on the SCSI specs, and missing the path we need to take to achieve additional flexibility.

With Linux, it's all about evolution and the path we take.

Hmmm... I'm fine with "not being religious about specs", but I hope we try to respect them as much as possible, because it's the only way to get everything working and not get the finger pointed to when there's a problem. When I put netfilter + window tracking in production 2 years ago, there were a lot of drops (about 2% of sessions = ~40/s), because shortcuts had been taken WRT rfc793 ("the specs"). Then, printing the whole RFC+erratas was the only way to get the code working and supporting the most bizarre cases that had previously been considered stupid or impossible by the developpers (including me during the first phase of the fixes).

I prefer that we stick to specs even if we just implement what we *need* from them, leaving lots of blank boxes on the diagram, rather than interprete them as we think would be better and get annoyed everytime a vendor tries to adapt it to support his hardware.

Quoted 5 lines
Quoted 2 lines

By "too literal" do you mean "following specs too closely", or do you mean "being realistic without tweaking things".

I mean, paying too much attention to specs at the expense of understanding how Linux code needs to be shaped.

Both are true : Linux code needs to be shaped to match specs. We must not spend time on what we don't need but we must respect the model and layering, and that's true in any subsystem. Networking for example, is very clean in this area. Even accelerations do not break layering, it's just that some of the work can be pushed down from layer to layer until one can process it (eg: checksums). And when I worked on bonding, I did not have problems with it breaking upper layers. I really believe that's important, it's the first step to avoid spending time in debugging.

Cheers,
Willy

#80 lore raw
Quoted 9 lines · Willy Tarreau
Quoted 5 lines · Jeff Garzik

Linux is about getting things done, not being religious about specifications. You are way too focused on the SCSI specs, and missing the path we need to take to achieve additional flexibility.

With Linux, it's all about evolution and the path we take.

Hmmm... I'm fine with "not being religious about specs", but I hope we try to respect them as much as possible

a spec describes how the hw works... how we do the sw piece is up to us ;)

(I know the scsi stuff also provides sort of a reference "here is how you can do it in sw" but I see that more as you "you need this functionality" not "you need this exact architecture in your software")

#81 lore raw
Quoted 3 lines · Arjan van de Ven

a spec describes how the hw works... how we do the sw piece is up to us ;)

Arjan, I'll be your best friend here:
Never say this in public or in an intervew.

Hardware folks needs to work with software folks and software folks need to work with hardware folks.

This is what makes good design.

Luben

#82 lore raw
Quoted 8 lines · Luben Tuikov
Quoted 2 lines · Arjan van de Ven

a spec describes how the hw works... how we do the sw piece is up to us ;)

Arjan, I'll be your best friend here:
Never say this in public or in an intervew.

It's hard-earned experience. We constantly have to teach hardware vendors how to write good drivers.

At some point you have to step away from the spec, and ask yourself what makes sense for Linux. I've already had to poke T10 when they put silly things in the SAT spec.

As a tangent, I already have a design for a Linux filesystem that makes use of SCSI object-based storage (to James's horror, no doubt :)). It's a fun thing to ponder.

Quoted 2 lines

Hardware folks needs to work with software folks and software folks need to work with hardware folks.

Certainly. The historical disconnect is where hardware vendors tend to presume They Know Best, when in reality it needs to be an equal tradeoff. Hardware vendors must admit they don't know Linux, and Linux developers must admit that hardware vendors know their own hardware better than anyone else.

Jeff

#83 lore raw
Quoted 6 lines · Jeff Garzik
Quoted 2 lines

Arjan, I'll be your best friend here:
Never say this in public or in an intervew.

It's hard-earned experience. We constantly have to teach hardware vendors how to write good drivers.

I'm sure you have. Hardware vendors are lost without Jeff, James Bottomley and Christoph.

You see, it is because of your _enormous_ ego as shown above, that the code is being blocked.

Quoted 2 lines

At some point you have to step away from the spec, and ask yourself what makes sense for Linux.

I'm sure -- flush interoperability down the drain.

Quoted 2 lines

I've already had to poke T10 when they put silly
things in the SAT spec.

Surely they are lost without you.

Quoted 3 lines

As a tangent, I already have a design for a Linux filesystem that makes use of SCSI object-based storage (to James's horror, no doubt :)). It's a fun thing to ponder.

Ok, so the way I see it you want to show who has got the bigger balls?

Jeff, I have *worked* on a Linux OBD-based filesystem.

Are you going to stop this self-gratifying stuff?

Quoted 8 lines
Quoted 2 lines

Hardware folks needs to work with software folks and software folks need to work with hardware folks.

Certainly. The historical disconnect is where hardware vendors tend to presume They Know Best, when in reality it needs to be an equal tradeoff. Hardware vendors must admit they don't know Linux, and Linux developers must admit that hardware vendors know their own hardware better than anyone else.

Reflection of above:
The historical disconnect is where "the community" tend to
presume They Know Best, when in reality it needs to be an equal tradeoff. "The community" must admit they don't know hardware, and hardware developers must admit that "the community" know their own code better than anyone else.

Jeff, if you had started looking at the design and firmware of any new SCSI storage chip, you'd see how incredibly similar it is to the transport it defines, and thus to SAM, since the transport itself has to comply with SAM for interoperability (TMF and all).

Linux SCSI does _not_ need to do "its own thing". There are perfectly well defined specs, telling you how things are conceptually _and_ in the physical world.

In order to control those objects, you need to represent them internally (you can learn this either in neuroscience class or in OOD & OOP comp sci classes) as you can see has been done in the SAS Transport Layer code.

So if you want _better control_, higher quality you need to invent _your own_ stuff as _little as possible_ and represent things as they are.

Luben

#84 lore raw
Quoted 6 lines · Luben Tuikov
Quoted 4 lines · Jeff Garzik
Quoted 2 lines

Arjan, I'll be your best friend here:
Never say this in public or in an intervew.

Quoted 8 lines
Quoted 1 line

It's hard-earned experience. We constantly have to teach hardware vendors how to write good drivers.

I'm sure you have. Hardware vendors are lost without Jeff, James Bottomley and Christoph.

You see, it is because of your _enormous_ ego as shown above, that the code is being blocked.

No, I was referring to things such as, e.g.
http://people.redhat.com/arjanv/olspaper.pdf
http://people.redhat.com/arjanv/OLS.pdf

It has nothing to do with ego, just hard-won experience.

There are bunches of hardware vendors who have their patches merged immediately after posting. They get it. They have internalized the reasons why Linux drivers look the way they do.

Quoted 9 lines
Quoted 1 line

As a tangent, I already have a design for a Linux filesystem that makes use of SCSI object-based storage (to James's horror, no doubt :)). It's a fun thing to ponder.

Ok, so the way I see it you want to show who has got the bigger balls?

Jeff, I have *worked* on a Linux OBD-based filesystem.

Are you going to stop this self-gratifying stuff?

Oh good grief. It was an example, silly. Trying to lighten the mood, even.

Jeff

#85 lore raw
In reply to Luben Tuikov
Quoted 4 lines · Luben Tuikov

Hardware folks needs to work with software folks and software folks need to work with hardware folks.

This is what makes good design.

This is so true, and so often overlooked when hardware is being designed and built. A lot of it can be attributed to mismanagement and bad communication between departments ... But, that's the drawback of the corporate system

#86 lore raw
In reply to Arjan van de Ven
Quoted 4 lines · Arjan van de Ven
Quoted 3 lines · Willy Tarreau
Quoted 1 line · Jeff Garzik

Linux is about getting things done, not being religious about specifications. You are way too focused on the SCSI specs, and missing the path we need to take to achieve additional flexibility.

AFAIU, demands to get our concepts closer to SAM concepts are actually motivated by this: To achieve additional flexibility. (In particular, to ease integration of the various transports.)

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

With Linux, it's all about evolution and the path we take.

Hmmm... I'm fine with "not being religious about specs", but I hope we try to respect them as much as possible

a spec describes how the hw works... how we do the sw piece is up to us ;)

We implement drivers of initiators. (Well, targets too.) The specs describe _what_ initiators do. Thereby they partly describe _how_ drivers of initiators (our sw pieces) work.

Quoted 3 lines

(I know the scsi stuff also provides sort of a reference "here is how you can do it in sw" but I see that more as you "you need this functionality" not "you need this exact architecture in your software")

This is correct. The SAM is what it is --- the SCSI-3 Architecture Model, not the architecture model of Linux' SCSI stack.

However it is very desirable to reflect layers and concepts of the SAM in our stack. One class of reasons is maintainability. No person is able to understand the stack; nor is a person able to consume and understand all or even half of the SCSI specs. No person is able to construct a mapping between the whole stack and the whole SCSI-3 Architecture Model (in his mind or with pencil and paper...). Therefore there have to be _components_ of the stack's architecture model which map 1:1 to _components_ of the SCSI-3 Architecture Model.

Fortunately, SAM layers and concepts are already there in the stack, although incomplete and incoherent. It will always be disputable _how_ complete and coherent our software should be in this respect. However it is out of a question that our software's architecture model might arbitrarily differ from the SAM.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =--= ===-=
http://arcgraph.de/sr/
#87 lore raw
Quoted 10 lines · Stefan Richter
Quoted 5 lines · Arjan van de Ven
Quoted 3 lines · Willy Tarreau
Quoted 1 line · Jeff Garzik

Linux is about getting things done, not being religious about specifications. You are way too focused on the SCSI specs, and missing the path we need to take to achieve additional flexibility.

AFAIU, demands to get our concepts closer to SAM concepts are actually motivated by this: To achieve additional flexibility. (In particular, to ease integration of the various transports.)

That's what transport classes help achieve.

We just gotta move gunk from the core (HCIL etc.) to scsi_transport_spi before we get there.

Quoted 1 line

We implement drivers of initiators. (Well, targets too.) The specs describe _what_ initiators do. Thereby they partly describe _how_ drivers of initiators (our sw pieces) work.

Mostly agreed. Some of the firmware-based and emulated SCSI stuff is a bit of an I_T mix.

Quoted 3 lines

However it is very desirable to reflect layers and concepts of the SAM in our stack. One class of reasons is maintainability. No person is able to understand the stack; nor is a person able to consume and understand all or even half of the SCSI specs. No person is able to construct a mapping between the whole stack and the whole SCSI-3 Architecture Model (in his mind or with pencil and paper...). Therefore there have to be _components_ of the stack's architecture model which map 1:1 to _components_ of the SCSI-3 Architecture Model.

Fortunately, SAM layers and concepts are already there in the stack, although incomplete and incoherent. It will always be disputable _how_ complete and coherent our software should be in this respect. However it is out of a question that our software's architecture model might arbitrarily differ from the SAM.

I think just about everybody agrees with this.

The current thread is more about the path to take, to get there...

The general point about specs is that you gotta think about them, not just blindly implement them. SNIA for example is notorious for generating silly storage-related specifications. And some of the T10 stuff is... well... obviously designed by committee :)

Jeff

#88 lore raw
In reply to Arjan van de Ven
Quoted 6 lines · Arjan van de Ven
Quoted 5 lines · Willy Tarreau
Quoted 4 lines · Jeff Garzik

Linux is about getting things done, not being religious about specifications. You are way too focused on the SCSI specs, and missing the path we need to take to achieve additional flexibility.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

With Linux, it's all about evolution and the path we take.

Hmmm... I'm fine with "not being religious about specs", but I hope we try to respect them as much as possible

a spec describes how the hw works... how we do the sw piece is up to us ;)

No Arjan, you cannot say that ! (well, of course you can but in this case you may be wrong). A spec describes any process, whether it's soft or hard, and BTW, the frontier between soft and hard is diminishing. When I designed a PI-Bus-PCI bridge 10 years ago, I used PCI 2.1 Specification. And it was more related to software than hardware (FSMs, config registers, etc...).

It's the *implementation* which is up to us, not the spec. A spec will never tell you that you have to be compliant with 4k stacks or things like this. This is implementation. What it tells you is when interrupt X strikes and you read bit Y from reg Z, then you must reset bit Y before leaving. And this is software specs, not hardware.

Quoted 3 lines

(I know the scsi stuff also provides sort of a reference "here is how you can do it in sw" but I see that more as you "you need this functionality" not "you need this exact architecture in your software")

Keeping close to an accepted standard model makes it far easier to upgrade later, but you're right, the spec does not tell you what your implementation must look like.

I think we agree but just don't give the exact same meaning to words.

Regards,
Willy

#89 lore raw
In reply to Arjan van de Ven
Quoted 3 lines · Arjan van de Ven

a spec describes how the hw works... how we do the sw piece is up to us ;)

How we do the SW is indeed up to us, but I want to step in on your first point.

Again.

A "spec" is close to useless. I have _never_ seen a spec that was both big enough to be useful _and_ accurate.

And I have seen _lots_ of total crap work that was based on specs. It's _the_ single worst way to write software, because it by definition means that the software was written to match theory, not reality.

So there's two MAJOR reasons to avoid specs:

- they're dangerously wrong. Reality is different, and anybody who thinks specs matter over reality should get out of kernel programming NOW. When reality and specs clash, the spec has zero meaning. Zilch. Nada. None.

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

- specs have an inevitably tendency to try to introduce abstractions levels and wording and documentation policies that make sense for a written spec. Trying to implement actual code off the spec leads to the code looking and working like CRAP.

The classic example of this is the OSI network model protocols. Classic spec-design, which had absolutely _zero_ relevance for the real world. We still talk about the seven layers model, because it's a convenient model for _discussion_, but that has absolutely zero to do with any real-life software engineering. In other words, it's a way to _talk_ about things, not to implement them.

And that's important. Specs are a basis for _talking_about_ things. But they are _not_ a basis for implementing software.

So please don't bother talking about specs. Real standards grow up _despite_ specs, not thanks to them.

Linus

#90 lore raw

<fun_but_off_topic>

[Removing most of the CC. Because they've got real work to do]

Quoted 1 line · Linus Torvalds

[...]

Quoted 1 line

A "spec" is close to useless.

The only usefulness of a spec is to allow to differ between morons and assholes.

http://diveintomark.org/archives/2004/08/16/specs

Couldn't resist.

</fun_but_off_topic>

J

#91 lore raw
In reply to Linus Torvalds
Quoted 7 lines · --- Linus Torvalds

A "spec" is close to useless. I have _never_ seen a spec that was both big enough to be useful _and_ accurate.

And I have seen _lots_ of total crap work that was based on specs. It's _the_ single worst way to write software, because it by definition means that the software was written to match theory, not reality.

A spec defines how a protocol works and behaves. All SCSI specs are currently very layered and defined by FSMs.

This is _the reason_ I can plug in an Adaptec SAS host adapter to Vitesse Expander which has a Seagate SAS disk attached to phy X... And guess what? They interoperate and communicate with each other.

Why? Because at each layer (physical/link/phy/etc) each one of them follow the FSMs defined in the, guess where, SAS spec.

If you take a SAS/SATA/FC/etc course, they _show you_ a link trace and then _show_ you how all of it is defined by the FSM specs, and make you follow the FSMs.

Quoted 1 line

So there's two MAJOR reasons to avoid specs:

Ok, then I accept that you and James Bottomley and Christoph are _right_, and I'm wrong.

I see we differ in ideology.

Quoted 4 lines

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

But this is _the_ definition of a theory. No one is arguing that a theory is not an approximation to observed behaviour.

What you have here is interoperability. Only possible because different vendors follow the same spec(s).

Quoted 4 lines

- specs have an inevitably tendency to try to introduce abstractions levels and wording and documentation policies that make sense for a written spec. Trying to implement actual code off the spec leads to the code looking and working like CRAP.

Ok, I give up: I'm wrong and you and James B are right.

Quoted 1 line

The classic example of this is the OSI network model protocols. Classic

Yes, it is a _classic_ example and OSI is _very_ old.

_But_ the tendency of representing things in a _layered_, object oriented design has persisted.

Quoted 5 lines

spec-design, which had absolutely _zero_ relevance for the real world. We still talk about the seven layers model, because it's a convenient model for _discussion_, but that has absolutely zero to do with any real-life software engineering. In other words, it's a way to _talk_ about things, not to implement them.

Ok.

Quoted 2 lines

And that's important. Specs are a basis for _talking_about_ things. But they are _not_ a basis for implementing software.

Ok. Let's forget about maintenance and adding _new_ functionality.

Quoted 2 lines

So please don't bother talking about specs. Real standards grow up _despite_ specs, not thanks to them.

Yes, you're right. Linus is always right.

Now to things more pertinent, which I'm sure people are interested in:

Jeff has been appointed to the role of integrating the SAS code with the Linux SCSI _model_, with James Bottomley's "transport attributes". So you can expect more patches from him.

Regards,
Luben

P.S. I have to get this 8139too.c network card here working.

#92 lore raw

Luben,

The role of standard bodies is to primarily enforce interoperability but while they suggest FSMs and layering, those directives are not mandatory.

I have also seen industrial SCSI Core implementations from various sources to come to the following conclusions (i) they do not implement all the manadatory stuff (ii) they implement just enough to get by with interoperability [who has the time] (iii) any layering design is evolutionary and (iv) none of them come close to the T10 FSMs.

You may disagree, but there needs to be a balance between standards and implementations.

Luben Tuikov
<[email protected]
m> To
Sent by: Linus Torvalds <[email protected]>,
linux-scsi-owner@ Arjan van de Ven
vger.kernel.org <[email protected]>
cc
Willy Tarreau <[email protected]>,
09/29/2005 04:20 SCSI Mailing List
PM <[email protected]>,
Andrew Morton <[email protected]>, Linux Kernel Mailing List
Please respond to <[email protected]>,
[email protected] Luben Tuikov
<[email protected]>, Jeff Garzik <[email protected]>
Subject
Re: I request inclusion of SAS Transport Layer and AIC-94xx into the kernel

Quoted 2 lines · --- Linus Torvalds

A "spec" is close to useless. I have _never_ seen a spec that was both

big

Quoted 5 lines

enough to be useful _and_ accurate.

And I have seen _lots_ of total crap work that was based on specs. It's _the_ single worst way to write software, because it by definition means that the software was written to match theory, not reality.

A spec defines how a protocol works and behaves. All SCSI specs are currently very layered and defined by FSMs.

This is _the reason_ I can plug in an Adaptec SAS host adapter to Vitesse Expander which has a Seagate SAS disk attached to phy X... And guess what? They interoperate and communicate with each other.

Why? Because at each layer (physical/link/phy/etc) each one of them follow the FSMs defined in the, guess where, SAS spec.

If you take a SAS/SATA/FC/etc course, they _show you_ a link trace and then _show_ you how all of it is defined by the FSM specs, and make you follow the FSMs.

Quoted 1 line

So there's two MAJOR reasons to avoid specs:

Ok, then I accept that you and James Bottomley and Christoph are _right_, and I'm wrong.

I see we differ in ideology.

Quoted 4 lines

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

But this is _the_ definition of a theory. No one is arguing that a theory is not an approximation to observed behaviour.

What you have here is interoperability. Only possible because different vendors follow the same spec(s).

Quoted 3 lines

- specs have an inevitably tendency to try to introduce abstractions levels and wording and documentation policies that make sense for a written spec. Trying to implement actual code off the spec leads to

the

Quoted 1 line

code looking and working like CRAP.

Ok, I give up: I'm wrong and you and James B are right.

Quoted 1 line

The classic example of this is the OSI network model protocols.

Classic

Yes, it is a _classic_ example and OSI is _very_ old.

_But_ the tendency of representing things in a _layered_, object oriented design has persisted.

Quoted 6 lines

spec-design, which had absolutely _zero_ relevance for the real world.

We still talk about the seven layers model, because it's a convenient model for _discussion_, but that has absolutely zero to do with any real-life software engineering. In other words, it's a way to _talk_ about things, not to implement them.

Ok.

Quoted 1 line

And that's important. Specs are a basis for _talking_about_ things.

But

Quoted 1 line

they are _not_ a basis for implementing software.

Ok. Let's forget about maintenance and adding _new_ functionality.

Quoted 2 lines

So please don't bother talking about specs. Real standards grow up _despite_ specs, not thanks to them.

Yes, you're right. Linus is always right.

Now to things more pertinent, which I'm sure people are interested in:

Jeff has been appointed to the role of integrating the SAS code with the Linux SCSI _model_, with James Bottomley's "transport attributes". So you can expect more patches from him.

Regards,
Luben

P.S. I have to get this 8139too.c network card here working.

-
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

#93 lore raw

Prasenjit,

The role of a standards body is to self promote and backslap each other amd figure out how to divide the market and make money and not cause problems.

The problem here is T10/T11 is the protocol is "ends justify the means".

This is where the clash of technical and design happens.

If the standards body was going to "primarily enforce interoperability", then why the heck did the T10 proposal for "domain validation" become an empty file and was withdrawn? IIRC it was Adaptec who helped to kill Domain Validation on T10, but I could be wrong and correction is warrented here if needed.

"(iv) none of them come close to the T10 FSMs" is the answer, and this justifies Linux's position to operate under "ends justify the means".

I can tell you why the T13 proposal died. I killed when I withdrew it as a direct result of T10's actions or lack of such.

As much as I believe in NCITS standards, they are worthless if no one is there to assist in the process of creation, model, and adoption.

Regardless of anything stated above, the problem with creation of a scsi standard core is most of the VOODOO of SCSI is hidden in the firmware. James knows this fact and points it out on occassion. SCSI is a FUZZY State Machine and nowhere close to being consider finite.

Not sure if there is a good solution to date; however, James does have an strong understanding of the mess and Christop is a good right hand enforcer regardless that he and I disagree more often than agree.

Cheers,

Andre Hedrick
LAD Storage Consulting Group

Quoted 148 lines · Prasenjit Sarkar

Luben,

The role of standard bodies is to primarily enforce interoperability but while they suggest FSMs and layering, those directives are not mandatory.

I have also seen industrial SCSI Core implementations from various sources to come to the following conclusions (i) they do not implement all the manadatory stuff (ii) they implement just enough to get by with interoperability [who has the time] (iii) any layering design is evolutionary and (iv) none of them come close to the T10 FSMs.

You may disagree, but there needs to be a balance between standards and implementations.

Luben Tuikov
<[email protected]
m> To
Sent by: Linus Torvalds <[email protected]>,
linux-scsi-owner@ Arjan van de Ven
vger.kernel.org <[email protected]>
cc
Willy Tarreau <[email protected]>,
09/29/2005 04:20 SCSI Mailing List
PM <[email protected]>,
Andrew Morton <[email protected]>, Linux Kernel Mailing List
Please respond to <[email protected]>,
[email protected] Luben Tuikov
<[email protected]>, Jeff Garzik <[email protected]>
Subject
Re: I request inclusion of SAS Transport Layer and AIC-94xx into the kernel

Quoted 2 lines · --- Linus Torvalds

A "spec" is close to useless. I have _never_ seen a spec that was both

big

Quoted 5 lines

enough to be useful _and_ accurate.

And I have seen _lots_ of total crap work that was based on specs. It's _the_ single worst way to write software, because it by definition means that the software was written to match theory, not reality.

A spec defines how a protocol works and behaves. All SCSI specs are currently very layered and defined by FSMs.

This is _the reason_ I can plug in an Adaptec SAS host adapter to Vitesse Expander which has a Seagate SAS disk attached to phy X... And guess what? They interoperate and communicate with each other.

Why? Because at each layer (physical/link/phy/etc) each one of them follow the FSMs defined in the, guess where, SAS spec.

If you take a SAS/SATA/FC/etc course, they _show you_ a link trace and then _show_ you how all of it is defined by the FSM specs, and make you follow the FSMs.

Quoted 1 line

So there's two MAJOR reasons to avoid specs:

Ok, then I accept that you and James Bottomley and Christoph are _right_, and I'm wrong.

I see we differ in ideology.

Quoted 4 lines

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

But this is _the_ definition of a theory. No one is arguing that a theory is not an approximation to observed behaviour.

What you have here is interoperability. Only possible because different vendors follow the same spec(s).

Quoted 3 lines

- specs have an inevitably tendency to try to introduce abstractions levels and wording and documentation policies that make sense for a written spec. Trying to implement actual code off the spec leads to

the

Quoted 1 line

code looking and working like CRAP.

Ok, I give up: I'm wrong and you and James B are right.

Quoted 1 line

The classic example of this is the OSI network model protocols.

Classic

Yes, it is a _classic_ example and OSI is _very_ old.

_But_ the tendency of representing things in a _layered_, object oriented design has persisted.

Quoted 6 lines

spec-design, which had absolutely _zero_ relevance for the real world.

We still talk about the seven layers model, because it's a convenient model for _discussion_, but that has absolutely zero to do with any real-life software engineering. In other words, it's a way to _talk_ about things, not to implement them.

Ok.

Quoted 1 line

And that's important. Specs are a basis for _talking_about_ things.

But

Quoted 1 line

they are _not_ a basis for implementing software.

Ok. Let's forget about maintenance and adding _new_ functionality.

Quoted 2 lines

So please don't bother talking about specs. Real standards grow up _despite_ specs, not thanks to them.

Yes, you're right. Linus is always right.

Now to things more pertinent, which I'm sure people are interested in:

Jeff has been appointed to the role of integrating the SAS code with the Linux SCSI _model_, with James Bottomley's "transport attributes". So you can expect more patches from him.

Regards,
Luben

P.S. I have to get this 8139too.c network card here working.

-
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

-
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

#94 lore raw
In reply to Luben Tuikov
Quoted 8 lines · Luben Tuikov
Quoted 5 lines

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

But this is _the_ definition of a theory. No one is arguing that a theory is not an approximation to observed behaviour.

No.

A scientific theory is an approximation of observed behaviour WITH NO KNOWN HOLES.

Once there are known holes in the theory, it's not a scientific theory. At best it's an approximation, but quite possibly it's just plain wrong.

And that's my point. Specs are not only almost invariably badly written, they also never actually match reality.

At which point at _best_ it's just an approximation. At worst, it's much worse. At worst, it causes people to ignore reality, and then it becomes religion.

And that's way _way_ too common. People who ignore reality are sadly not at all unusual.

"But the spec says ..." is pretty much always a sign of somebody who has just blocked out the fact that some device doesn't.

So don't talk about specs.

Talk about working code that is _readable_ and _works_.

There's an absolutely mindbogglingly huge difference between the two.

Linus

#95 lore raw
Quoted 3 lines

Once there are known holes in the theory, it's not a scientific theory. At best it's an approximation, but quite possibly it's just plain wrong.

You are right about scientific theory, but specs are not just a theory. You are mixing "discovery" and "invention".

A scientific theory has to match reality, because the universe deveops independently. There is no way you can enforce your theory down the throat on the "nature".

But the roles of specs are more than that. There are two parts of it:
1. unify/summarize the reality
2. guide future implementations on a unified road

It might do job 1 poorly (simply because the reality is a mess), but if everyone from the point on puts the effort to follow it, job 2 can be done, and it is the real goal. It can do this simply because *humans* can collaborate and be influenced for a goal that could eventually benefit everybody.

Quoted 6 lines

And that's my point. Specs are not only almost invariably badly written, they also never actually match reality.

At which point at _best_ it's just an approximation. At worst, it's much worse. At worst, it causes people to ignore reality, and then it becomes religion.

Let me add more to the moron/asshole argument:

Anyone that thinks specs are reality is a moron.

Anyone that thinks specs are useless and refuses to collaborate is an asshole. :)

#96 lore raw
In reply to Linus Torvalds
Quoted 5 lines · Linus Torvalds

No.

A scientific theory is an approximation of observed behaviour WITH NO KNOWN HOLES.

Since "approximation" is equivalent to a "known hole", there is no single scientific theory without known holes out there?! Well that's a segfault in brain - unless you don't consider math science of course.

A scientific theory is just a set of axioms and deduction rules. Not much more by definition...

#97 lore raw
Quoted 7 lines · Marcin Dalecki
Quoted 2 lines · Linus Torvalds

A scientific theory is an approximation of observed behaviour WITH NO KNOWN HOLES.

Since "approximation" is equivalent to a "known hole", there is no single scientific theory without known holes out there?! Well that's a segfault in brain - unless you don't consider math science of course.

A scientific theory is just a set of axioms and deduction rules. Not much more by definition...

I think a better explanation of 'scientific theory' is:

an explanation or definition of observed behaviour with no known error

which, is what I believe Linus was trying to say

#98 lore raw

[cc trimmed]

Quoted 3 lines

I think a better explanation of 'scientific theory' is:

an explanation or definition of observed behaviour with no known error

...that is testable. (Not that this has anything to do with the point.)

While jumping on the thread for no good reason, I might point out (to Luben) that ^w is erase word and ^h is erase character. Your stty settings may vary.

#99 lore raw
In reply to Linus Torvalds
Quoted 27 lines · Linus Torvalds
Quoted 7 lines · Luben Tuikov
Quoted 4 lines

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

But this is _the_ definition of a theory. No one is arguing that a theory is not an approximation to observed behaviour.

No.

A scientific theory is an approximation of observed behaviour WITH NO KNOWN HOLES.

Once there are known holes in the theory, it's not a scientific theory. At best it's an approximation, but quite possibly it's just plain wrong.

And that's my point. Specs are not only almost invariably badly written, they also never actually match reality.

At which point at _best_ it's just an approximation. At worst, it's much worse. At worst, it causes people to ignore reality, and then it becomes religion.

Quoted 7 lines

And that's way _way_ too common. People who ignore reality are sadly not at all unusual.

"But the spec says ..." is pretty much always a sign of somebody who has just blocked out the fact that some device doesn't.

So don't talk about specs.

Why not?

There are good, bad and ill-timed specs. The bad ones are ignored. Ill-timed ones gather dust, for example the SCSI Ultra 640 standard (SPI-5) since the industry has bet on SAS; hope they weren't expecting timely driver support from Linux.

As for a good spec how about the Multi Media Command (MMC) set which allows us to read music and data CDs written almost twenty years ago plus many different formats since then. It is currently (in MMC-5) being enhanced to cope with the next big bun fight in that space: Blue ray and HD-DVD (and their various content protection systems).

In the t10.org hierarchy of specs, MMC is subservient to the primary commands (SPC) and the general architecture (SAM). The companies that work in the MMC space (and tend to define that standard) have "bent the rules" over the years. The response from the (different set of) companies that are behind SPC and SAM was to make allowance for MMC.
The process seems to work pretty well and I am unaware of any proposed alternate interfaces. Transports have come and gone but the logical interface has remained.

Quoted 1 line

Talk about working code that is _readable_ and _works_.

For SAS we have a well thought out definition for what the interface should be to hardware specific drivers IMO. It is called CSMI, rechristened SDI. The editor of SDI is also the editor of SAS, SAS-1.1 and SAS-2. Judging from his work, he knows his stuff. Unfortunately SDI uses ioctls to define its interface, which is mainly between two kernel layers (if one ignores pass throughs). Sorry, did I mention "ioctl", oh that makes SDI unacceptable. Almost a year ago that is what happened to the first proposed SAS driver for Linux. That decision has pushed Luben (amongst others) into the position he is in now: come up with a "better" design, produce code and then watch it get rejected. So please cut Luben a bit of slack.

Just in case people think that I agree with Luben on using sysfs to represent the whole SAS topology and interesting bits suspended in it (i.e. SAS expanders), then I don't. I am, however, prepared to argue the detail. Since the days of Eric Youngdale I have believed that SCSI Host Bus Adapters (HBAs) should be addressable devices, just like network interfaces. IMO it is the block layer and its associated end devices that are the legacy thinking.

Quoted 1 line

There's an absolutely mindbogglingly huge difference between the two.

It is ironic that as the author of the SG_IO
passthrough ioctl the "specs" that I am
often asked to help circumvent are the "we
know better" variety built into various layers
of the linux kernel :-)

Doug Gilbert

#100 lore raw
Quoted 8 lines · Douglas Gilbert

For SAS we have a well thought out definition for what the interface should be to hardware specific drivers IMO. It is called CSMI, rechristened SDI. The editor of SDI is also the editor of SAS, SAS-1.1 and SAS-2. Judging from his work, he knows his stuff. Unfortunately SDI uses ioctls to define its interface, which is mainly between two kernel layers (if one ignores pass throughs). Sorry, did I mention "ioctl",

Hi Doug,

Almost all of the SDI stuff can be extracted by a user space library reading the SAS sysfs domain tree (which is the result of domain discovery).

Pictures of can be found here:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112629509826900&w=2

Since MPT-based hardware does domain discovery in the FIRMWARE, this is why you do not have the domain picture as easily.

Quoted 6 lines

oh that makes SDI unacceptable. Almost a year ago that is what happened to the first proposed SAS driver for Linux. That decision has pushed Luben (amongst others) into the position he is in now: come up with a "better" design, produce code and then watch it get rejected. So please cut Luben a bit of slack.

What James Bottomley et al. complained back then is that "common code" to SAS should be pulled out in a "common layer".

This layer is the SAS Transport layer.

But in the mean time, LSI came out with SAS, whose driver as you can see had nothing to do with SAS -- it was an MPT driver after all, so James Bottomley decides that whatever else comes along, it would use _his_ design. Whether it works for open transport, he doesn't want to listen. He is using his political power to enforce it.

Quoted 4 lines

Just in case people think that I agree with Luben on using sysfs to represent the whole SAS topology and interesting bits suspended in it (i.e. SAS expanders), then I don't. I am, however, prepared to argue the detail. Since the

Sorry, since the discover process keeps an internal representation of "what is out there" via discovery, I just tacked a kobject to each structure I have anyway, and showed it in sysfs.

I thought that was the whole purpose of sysfs -- to show kernel internal structures and dependencies.

Plus, this is what it _actually_ looks in the physical world.

Also you have to admit -- it looks cool:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112629509826900&w=2

Quoted 4 lines

days of Eric Youngdale I have believed that SCSI Host Bus Adapters (HBAs) should be addressable devices, just like network interfaces. IMO it is the block layer and its associated end devices that are the legacy thinking.

Host Adapters are addressable -- if there's an initiator on the domain, the discover process will discover it and it will show up in the SAS sysfs tree.

Quoted 5 lines

It is ironic that as the author of the SG_IO
passthrough ioctl the "specs" that I am
often asked to help circumvent are the "we
know better" variety built into various layers
of the linux kernel :-)

Indeed.

Luben

#101 lore raw
In reply to Douglas Gilbert

On Fri, 2005-09-30 at 17:29 +1000, Douglas Gilbert wrote:

snippage.

Quoted 8 lines

For SAS we have a well thought out definition for what the interface should be to hardware specific drivers IMO. It is called CSMI, rechristened SDI. The editor of SDI is also the editor of SAS, SAS-1.1 and SAS-2. Judging from his work, he knows his stuff. Unfortunately SDI uses ioctls to define its interface, which is mainly between two kernel layers (if one ignores pass throughs).

I talked to one of the authors of these specs. SDI is an attempt to create an open standard for the somewhat proprietary CSMI spec developed by HP. It is currently languishing in t10 due to the IOCTL problem you describe below (the "no new IOCTL's" doctrine caught them by surprise). There is some thought to going to a write()/read() on a character device model, but this has various problems as well.

Quoted 3 lines

Sorry, did I mention "ioctl",
oh that makes SDI unacceptable. Almost a year ago that is what happened to the first proposed SAS driver for Linux.

That was one of the reasons the MPT Fusion and Adaptec drivers were rejected. There were others as well, such as lack of a SAS transport class.

Andrew

Quoted 29 lines

That
decision has pushed Luben (amongst others) into the position he is in now: come up with a "better" design, produce code and then watch it get rejected. So please cut Luben a bit of slack.

Just in case people think that I agree with Luben on using sysfs to represent the whole SAS topology and interesting bits suspended in it (i.e. SAS expanders), then I don't. I am, however, prepared to argue the detail. Since the days of Eric Youngdale I have believed that SCSI Host Bus Adapters (HBAs) should be addressable devices, just like network interfaces. IMO it is the block layer and its associated end devices that are the legacy thinking.

Quoted 1 line

There's an absolutely mindbogglingly huge difference between the two.

It is ironic that as the author of the SG_IO
passthrough ioctl the "specs" that I am
often asked to help circumvent are the "we
know better" variety built into various layers
of the linux kernel :-)

Doug Gilbert
-
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

#102 lore raw
Quoted 7 lines · Andrew Patterson

I talked to one of the authors of these specs. SDI is an attempt to create an open standard for the somewhat proprietary CSMI spec developed by HP. It is currently languishing in t10 due to the IOCTL problem you describe below (the "no new IOCTL's" doctrine caught them by surprise). There is some thought to going to a write()/read() on a character device model, but this has various problems as well.

I think that read/write from a char device is going away too.

For this reason I showed the whole picture of the SAS domain in sysfs _and_ created a binary file attr to send/receive SMP requests/responses to control the domain and get attributes ("smp_portal" binary attr of each expander).

It is completely user space driven and a user space library is simple to write.

See drivers/scsi/sas/expander_conf.c which is a user space utility. For the output see Announcement 3:
http://linux.adaptec.com/sas/Announce_2.txt or here:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112629509318354&w=2

The code which implements it is very tiny, at the bottom of drivers/scsi/sas/sas_expander.c

Quoted 8 lines
Quoted 3 lines

Sorry, did I mention "ioctl",
oh that makes SDI unacceptable. Almost a year ago that is what happened to the first proposed SAS driver for Linux.

That was one of the reasons the MPT Fusion and Adaptec drivers were rejected. There were others as well, such as lack of a SAS transport class.

You mean the first Adaptec SAS "adp94xx" driver.

BTW, neither the original "adp94xx", nor the subsequent "aic94xx" Adaptec drivers implmented _any_ ioctls for CSMI/SDI.

Luben

#103 lore raw
In reply to Linus Torvalds
Quoted 2 lines · Linus Torvalds

And that's my point. Specs are not only almost invariably badly written, they also never actually match reality.

Linus, the world has changed around you.

Take a look at the SAS spec and then at a SAS chip implementation, for example.

(We're talking abou T10 specs, right?)

Quoted 2 lines

And that's way _way_ too common. People who ignore reality are sadly not at all unusual.

You are saying I ignored reality?

Quoted 1 line

Talk about working code that is _readable_ and _works_.

http://linux.adaptec.com/sas/

Luben

#104 lore raw
In reply to Luben Tuikov
Quoted 3 lines · Luben Tuikov

A spec defines how a protocol works and behaves. All SCSI specs are currently very layered and defined by FSMs.

A spec defines how a protocol works and behaves --- *if* it is well-specified and unambiguous, and *if* vendors actually implement the spec correctly. (And sometimes vendors have major economic incentives to cheat and either intentionally violate the specification, or simply not bother to test to make sure whether or not they implemented their hardware correctly.)

Computing history has been literred with specifications that were incompentently written and/or incompentently implemented --- from the disaster known as ACPI, to FDDI (early FDDI networking gear was interoperable only if you bought all of your gear from one vendor, natch), consumer-grade disks which lied about when data had been safely written to iron oxide to garner better Winbench scores, and many, many, many others.

This is one of the reasons why the IETF doesn't bless a networking standard until there are multiple independent, interoperable implementations --- and even _then_ there will be edge cases that won't be caught until much, much later.

In those cases, if you implement something which is religiously adherent to the specification, and it doesn't interoperate with the real world (i.e., everybody else, or some large part of the industry) --- do you claim that you are right because you are following the specification, and everyone else in the world is wrong? Or do you adapt to reality? People who are too in love with specifications so that they are not willing to be flexible will generally not be able to achieve complete interoperability. This is the reason for the IETF Maxim --- be conservative in what you send, liberal in what you will accept. And it's why interoperability testing and reference implementations are critical.

But it's also important to remember when there is a reference implementation, or pseudo-code in the specification, it's not the only way you can implement things. Very often, as Linus has pointed out, there are reasons why the pseudo-code in the specification is wholely inappropriate for a particular implementation. But that's OK; the implementation can use a different implementastion, as long as the result is interoperable.

Regards,

- Ted

#105 lore raw
In reply to Linus Torvalds

Linus,

I have to tip my hat to you sir.

As much as I wanted to believe and tried to make it happen ... ATA/IDE was forced to design many exception case events. Regardless how hard I an others tried to invoke/create a driver to mimic the "SPEC", the hardware people broke most of the rules and each chipset was littered with exception cases.

It has been 7 years since you and I started butting heads, and in the end both of us were right. A driver could be written to follow the standard exactly, and it would never work (alone, as-is) because the hardware was not paying attention the rules book.

Hope you can kick back and laugh about the history, too!

Have a great Day!

Andre Hedrick
LAD Storage Consulting Group

Quoted 55 lines · Linus Torvalds
Quoted 3 lines · Arjan van de Ven

a spec describes how the hw works... how we do the sw piece is up to us ;)

How we do the SW is indeed up to us, but I want to step in on your first point.

Again.

A "spec" is close to useless. I have _never_ seen a spec that was both big enough to be useful _and_ accurate.

And I have seen _lots_ of total crap work that was based on specs. It's _the_ single worst way to write software, because it by definition means that the software was written to match theory, not reality.

So there's two MAJOR reasons to avoid specs:

- they're dangerously wrong. Reality is different, and anybody who thinks specs matter over reality should get out of kernel programming NOW. When reality and specs clash, the spec has zero meaning. Zilch. Nada. None.

It's like real science: if you have a theory that doesn't match experiments, it doesn't matter _how_ much you like that theory. It's wrong. You can use it as an approximation, but you MUST keep in mind that it's an approximation.

- specs have an inevitably tendency to try to introduce abstractions levels and wording and documentation policies that make sense for a written spec. Trying to implement actual code off the spec leads to the code looking and working like CRAP.

The classic example of this is the OSI network model protocols. Classic spec-design, which had absolutely _zero_ relevance for the real world. We still talk about the seven layers model, because it's a convenient model for _discussion_, but that has absolutely zero to do with any real-life software engineering. In other words, it's a way to _talk_ about things, not to implement them.

And that's important. Specs are a basis for _talking_about_ things. But they are _not_ a basis for implementing software.

So please don't bother talking about specs. Real standards grow up _despite_ specs, not thanks to them.

Linus
-
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

#106 lore raw
In reply to Jeff Garzik

Jeff Garzik wrote:
[...]

Quoted 3 lines

HCIL stuff to move to SPI-specific transport code.

That is the task that must be completed BEFORE transport layer for SAS can be fully merged.

So it could at least be _halfway_ merged, like it was done with the other non-SPI transport layers long ago, couldn't it?

Signature · 3 lines
Stefan Richter
-=====-=-=-= =--= ===-=
http://arcgraph.de/sr/
#107 lore raw
In reply to Jeff Garzik
Quoted 3 lines · Jeff Garzik
Quoted 1 line

The sad truth is that SCSI Core knows only HCIL.

That's something that needs fixing, for SAS.

Not just for SAS.

Quoted 4 lines
Quoted 2 lines

The code doesn't alter Linux SCSI or anyone else's behaviour. It only _provides_ SAS support to the kernel.

That's one of the problems: It should update the SCSI core.

Sure, but the same is true for the other transports except for SPI.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =--= ===-=
http://arcgraph.de/sr/
#108 lore raw
In reply to Jeff Garzik
Quoted 1 line · Jeff Garzik

* Avoids (rather than fix) several SCSI core false dependencies on HCIL.

BTW, other SCSI transport layers in Linux do this too, and have been doing so for some time. So this is hardly a valid reason not to include the new SAS layer.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =--= ===-=
http://arcgraph.de/sr/
#109 lore raw

cover i386: NUMA emulation

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

A similar feature was accepted for x86_64 back in 2.6.9. These patches use the same config options and kernel command line parameters as the x86_64 code.

Patches that depend on 2.6.14-rc2:

[PATCH 01/07] i386: srat non acpi
[PATCH 02/07] i386: numa on non-smp
[PATCH 03/07] cpuset: smp or numa

Patches that depend on 2.6.14-rc2 plus two patches written by Dave Hansen and posted to lkml and linux-mm at Sep 13 2005:

i386: consolidate discontig functions into normal ones
i386: move NUMA code into numa.c

[PATCH 04/07] i386: numa warning fix
[PATCH 05/07] i386: sparsemem on pc
[PATCH 06/07] i386: discontigmem on pc
[PATCH 07/07] i386: numa emulation on pc

To test, configure your i386 kernel with CONFIG_X86_PC, CONFIG_NUMA_EMU and CONFIG_NUMA all set and pass "numa=fake=2" to the kernel to emulate two nodes.

Feedback is very appreciated.

Thanks,

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#110 lore raw

PATCH 1/7 i386: srat non acpi

This patch adds code to check the return value of acpi_find_root_pointer(). Without this patch systems without ACPI support such as QEMU crashes when booting a NUMA kernel configured with CONFIG_ACPI_SRAT=y.

---

 srat.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)
arch/i386/kernel/srat.c +6 -1
@@ -327,7 +327,12 @@ int __init get_memcfg_from_srat(void)
 	int tables = 0;
 	int i = 0;
 
-	acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, rsdp_address);
+	if (ACPI_FAILURE(acpi_find_root_pointer(ACPI_PHYSICAL_ADDRESSING, 
+						rsdp_address))) {
+		printk("%s: System description tables not found\n",
+		       __FUNCTION__);
+		goto out_err;
+	}
 
 	if (rsdp_address->pointer_type == ACPI_PHYSICAL_POINTER) {
 		printk("%s: assigning address to rsdp\n", __FUNCTION__);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#111 lore raw

PATCH 2/7 i386: numa on non-smp

In reply to Magnus Damm

This patch makes it possible to compile and use CONFIG_NUMA without CONFIG_SMP. Useful for NUMA emulation on real or emulated UP hardware.

---

 asm-i386/topology.h |    7 ++++++-
 linux/topology.h    |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
include/asm-i386/topology.h +6 -1
@@ -29,8 +29,9 @@
 
 #ifdef CONFIG_NUMA
 
-#include <asm/mpspec.h>
+#ifdef CONFIG_SMP
 
+#include <asm/mpspec.h>
 #include <linux/cpumask.h>
 
 /* Mappings between logical cpu number and node number */
@@ -88,6 +89,10 @@ static inline int node_to_first_cpu(int 
 	.nr_balance_failed	= 0,			\
 }
 
+#else
+#include <asm-generic/topology.h>
+#endif
+
 extern unsigned long node_start_pfn[];
 extern unsigned long node_end_pfn[];
 extern unsigned long node_remap_size[];
include/linux/topology.h +1 -1
@@ -158,7 +158,7 @@
 	.nr_balance_failed	= 0,			\
 }
 
-#ifdef CONFIG_NUMA
+#if defined(CONFIG_NUMA) && defined(CONFIG_SMP)
 #ifndef SD_NODE_INIT
 #error Please define an appropriate SD_NODE_INIT in include/asm/topology.h!!!
 #endif

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#112 lore raw

PATCH 3/7 cpuset: smp or numa

In reply to Magnus Damm

This patch for makes it possible to compile and use CONFIG_CPUSETS without CONFIG_SMP. Useful for NUMA emulation on real or emulated UP hardware.

---

 init/Kconfig    |    2 +-
 kernel/cpuset.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -245,7 +245,7 @@ config IKCONFIG_PROC
 
 config CPUSETS
 	bool "Cpuset support"
-	depends on SMP
+	depends on SMP || NUMA
 	help
 	  This option will let you create and manage CPUSETs which
 	  allow dynamically partitioning a system into sets of CPUs and
kernel/cpuset.c +2 -0
@@ -657,6 +657,7 @@ static int validate_change(const struct 
 
 static void update_cpu_domains(struct cpuset *cur)
 {
+#ifdef CONFIG_SMP
 	struct cpuset *c, *par = cur->parent;
 	cpumask_t pspan, cspan;
 
@@ -694,6 +695,7 @@ static void update_cpu_domains(struct cp
 	lock_cpu_hotplug();
 	partition_sched_domains(&pspan, &cspan);
 	unlock_cpu_hotplug();
+#endif
 }
 
 static int update_cpumask(struct cpuset *cs, char *buf)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#113 lore raw

PATCH 4/7 i386: numa warning fix

In reply to Magnus Damm

This patch contains a warning fix for the NUMA patch written by Dave Hansen which was posted to lkml and linux-mm at September 13:th 2005.

[snip]
CC arch/i386/mm/numa.o
arch/i386/mm/numa.c: In function `remap_numa_kva':
arch/i386/mm/numa.c:85: warning: implicit declaration of function `set_pmd_pfn'
LD arch/i386/mm/built-in.o
[snip]

---

 pgtable-3level.h |    1 -
 pgtable.h        |    2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)
include/asm-i386/pgtable-3level.h +0 -1
@@ -65,7 +65,6 @@ static inline void set_pte(pte_t *ptep, 
 		set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval))
 #define set_pud(pudptr,pudval) \
 		(*(pudptr) = (pudval))
-extern void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
 
 /*
  * Pentium-II erratum A13: in PAE mode we explicitly have to flush
include/asm-i386/pgtable.h +2 -0
@@ -327,6 +327,8 @@ static inline pte_t pte_modify(pte_t pte
 #define pmd_large(pmd) \
 ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT))
 
+extern void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
+
 /*
  * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
  *

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#114 lore raw

PATCH 5/7 i386: sparsemem on pc

In reply to Magnus Damm

This patch for enables and fixes sparsemem support on i386. This is the same patch that was sent to linux-kernel on September 6:th 2005, but this patch includes up-porting to fit on top of the patches written by Dave Hansen.

---

 Kconfig        |    4 ++--
 kernel/setup.c |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/i386/Kconfig +2 -2
@@ -762,7 +762,6 @@ config NUMA
 	depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
 	default n if X86_PC
 	default y if (X86_NUMAQ || X86_SUMMIT)
-	select SPARSEMEM_STATIC
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -801,7 +800,8 @@ config ARCH_DISCONTIGMEM_DEFAULT
 
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
-	depends on NUMA
+	depends on NUMA || (X86_PC && EXPERIMENTAL)
+	select SPARSEMEM_STATIC
 
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
arch/i386/kernel/setup.c +1 -0
@@ -390,6 +390,7 @@ int __init get_memcfg_numa_flat(void)
 	/* Run the memory configuration and find the top of memory. */
 	node_start_pfn[0] = 0;
 	node_end_pfn[0] = max_pfn;
+	memory_present(0, 0, max_pfn);
 
         /* Indicate there is one node available. */
 	nodes_clear(node_online_map);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#115 lore raw

Re: [PATCH 05/07] i386: sparsemem on pc

Quoted 3 lines · Magnus Damm

This patch for enables and fixes sparsemem support on i386. This is the same patch that was sent to linux-kernel on September 6:th 2005, but this patch includes up-porting to fit on top of the patches written by Dave Hansen.

I'll post a more comprehensive way to do this in just a moment.

Subject: memhotplug testing: hack for flat systems

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#116 lore raw

Re: [PATCH 05/07] i386: sparsemem on pc

Quoted 8 lines · Dave Hansen
Quoted 3 lines · Magnus Damm

This patch for enables and fixes sparsemem support on i386. This is the same patch that was sent to linux-kernel on September 6:th 2005, but this patch includes up-porting to fit on top of the patches written by Dave Hansen.

I'll post a more comprehensive way to do this in just a moment.

Subject: memhotplug testing: hack for flat systems

Looks much better, will compile and test on Monday. Thanks.

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#117 lore raw

PATCH 6/7 i386: discontigmem on pc

In reply to Magnus Damm

This patch enables and fixes discontigmem support for i386.

---

 arch/i386/Kconfig         |    8 ++++++--
 include/asm-i386/mmzone.h |    3 ++-
 include/linux/mmzone.h    |    5 +++++
 include/linux/numa.h      |    2 +-
 mm/Kconfig                |    2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)
arch/i386/Kconfig +6 -2
@@ -790,9 +790,13 @@ config HAVE_ARCH_ALLOC_REMAP
 	depends on NUMA
 	default y
 
+config ARCH_FLATMEM_ENABLE
+	def_bool y
+	depends on X86_PC
+
 config ARCH_DISCONTIGMEM_ENABLE
 	def_bool y
-	depends on NUMA
+	depends on NUMA || (X86_PC && EXPERIMENTAL)
 
 config ARCH_DISCONTIGMEM_DEFAULT
 	def_bool y
@@ -812,7 +816,7 @@ source "mm/Kconfig"
 config HAVE_ARCH_EARLY_PFN_TO_NID
 	bool
 	default y
-	depends on NUMA
+	depends on NUMA || DISCONTIGMEM
 
 config HIGHPTE
 	bool "Allocate 3rd-level pagetables from highmem"
include/asm-i386/mmzone.h +2 -1
@@ -75,7 +75,7 @@ static inline int pfn_to_nid(unsigned lo
 #endif
 }
 
-#define node_localnr(pfn, nid)		((pfn) - node_data[nid]->node_start_pfn)
+#define node_localnr(pfn, nid)		((pfn) - NODE_DATA(nid)->node_start_pfn)
 
 /*
  * Following are macros that each numa implmentation must define.
@@ -106,6 +106,7 @@ static inline int pfn_to_nid(unsigned lo
 ({									\
 	unsigned long __pfn = pfn;					\
 	int __node  = pfn_to_nid(__pfn);				\
+	int foo = (&foo == &__node); /* disable unused warning */	\
 	&NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)];	\
 })
 
include/linux/mmzone.h +5 -0
@@ -414,7 +414,12 @@ extern struct pglist_data contig_page_da
 #define NODE_DATA(nid)		(&contig_page_data)
 #define NODE_MEM_MAP(nid)	mem_map
 #define MAX_NODES_SHIFT		1
+
+#ifdef CONFIG_DISCONTIGMEM
+#include <asm/mmzone.h>
+#else
 #define pfn_to_nid(pfn)		(0)
+#endif
 
 #else /* CONFIG_NEED_MULTIPLE_NODES */
 
include/linux/numa.h +1 -1
@@ -3,7 +3,7 @@
 
 #include <linux/config.h>
 
-#ifndef CONFIG_FLATMEM
+#ifdef CONFIG_NUMA
 #include <asm/numnodes.h>
 #endif
 
mm/Kconfig +1 -1
@@ -84,7 +84,7 @@ config FLAT_NODE_MEM_MAP
 #
 config NEED_MULTIPLE_NODES
 	def_bool y
-	depends on DISCONTIGMEM || NUMA
+	depends on NUMA
 
 config HAVE_MEMORY_PRESENT
 	def_bool y

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#118 lore raw

PATCH 7/7 i386: numa emulation on pc

In reply to Magnus Damm

This patch adds NUMA emulation for i386 on top of the fixes for sparsemem and discontigmem. NUMA emulation already exists for x86_64, and this patch adds the same feature using the same config option CONFIG_NUMA_EMU. The kernel command line option used is also the same as for x86_64.

Pass "numa=fake=N" to the kernel where N is the number of nodes to emulate.

---

 arch/i386/Kconfig           |   20 +++++++-
 arch/i386/kernel/setup.c    |   34 +++++++++-----
 arch/i386/mm/numa.c         |  100 ++++++++++++++++++++++++++++++++++++++++++++ include/asm-i386/mmzone.h   |    7 +++
 include/asm-i386/numnodes.h |    2
 5 files changed, 145 insertions(+), 18 deletions(-)
arch/i386/Kconfig +16 -4
@@ -134,7 +134,7 @@ endchoice
 config ACPI_SRAT
 	bool
 	default y
-	depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
+	depends on NUMA && (X86_SUMMIT || X86_GENERICARCH || NUMA_EMU)
 
 config X86_SUMMIT_NUMA
 	bool
@@ -756,12 +756,21 @@ config X86_PAE
 	depends on HIGHMEM64G
 	default y
 
+config NUMA_EMU
+	bool "Numa Memory Nodes Emulation"
+	depends on X86_PC
+	default n
+	help
+	  Enable NUMA emulation. A regular single-node PC machine will be
+	  split into virtual nodes when booted with "numa=fake=N", where
+	  N is the number of nodes.
+
 # Common NUMA Features
 config NUMA
 	bool "Numa Memory Allocation and Scheduler Support"
-	depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
+	depends on (NUMA_EMU && ACPI && HIGHMEM) || (SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI)))
 	default n if X86_PC
-	default y if (X86_NUMAQ || X86_SUMMIT)
+	default y if (X86_NUMAQ || X86_SUMMIT || NUMA_EMU)
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -770,6 +779,9 @@ comment "NUMA (NUMA-Q) requires SMP, 64G
 comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
 	depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI)
 
+comment "NUMA (Emulation on PC) requires highmem support and ACPI"
+	depends on X86_PC && (!HIGHMEM || !ACPI)
+
 config HAVE_ARCH_BOOTMEM_NODE
 	bool
 	depends on NUMA
@@ -916,7 +928,7 @@ config IRQBALANCE
 # Summit needs it only when NUMA is on
 config BOOT_IOREMAP
 	bool
-	depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
+	depends on (((X86_SUMMIT || X86_GENERICARCH || NUMA_EMU) && NUMA) || (X86 && EFI))
 	default y
 
 config REGPARM
arch/i386/kernel/setup.c +21 -13
@@ -931,6 +931,13 @@ static void __init parse_cmdline_early (
 			elfcorehdr_addr = memparse(from+11, &from);
 #endif
 
+#ifdef CONFIG_NUMA_EMU
+		// virtual numa setup
+		else if (!memcmp(from, "numa=", 5)) {
+			extern void numa_setup(char*, char**);
+			numa_setup(from+5, &from);
+		}
+#endif
 		/*
 		 * highmem=size forces highmem to be exactly 'size' bytes.
 		 * This works even on boxes that have no highmem otherwise.
@@ -1211,26 +1218,22 @@ static inline unsigned long  nid_size_pa
 {
 	return node_end_pfn[nid] - node_start_pfn[nid];
 }
-static inline int nid_starts_in_highmem(int nid)
-{
-	return node_start_pfn[nid] >= max_low_pfn;
-}
-
 void __init nid_zone_sizes_init(int nid)
 {
 	unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
-	unsigned long max_dma;
+	unsigned long max_dma = min(max_hardware_dma_pfn(), max_low_pfn);
 	unsigned long start = node_start_pfn[nid];
 	unsigned long end = node_end_pfn[nid];
 
 	if (node_has_online_mem(nid)){
-		if (nid_starts_in_highmem(nid)) {
-			zones_size[ZONE_HIGHMEM] = nid_size_pages(nid);
-		} else {
-			max_dma = min(max_hardware_dma_pfn(), max_low_pfn);
-			zones_size[ZONE_DMA] = max_dma;
-			zones_size[ZONE_NORMAL] = max_low_pfn - max_dma;
-			zones_size[ZONE_HIGHMEM] = end - max_low_pfn;
+		if (start < max_dma) {
+			zones_size[ZONE_DMA] = min(end, max_dma) - start;
+		}
+		if (start < max_low_pfn && max_dma < end) {
+			zones_size[ZONE_NORMAL] = min(end, max_low_pfn) - max(start, max_dma);
+		}
+		if (max_low_pfn <= end) {
+			zones_size[ZONE_HIGHMEM] = end - max(start, max_low_pfn);
 		}
 	}
 
@@ -1270,7 +1273,12 @@ void __init setup_bootmem_allocator(void
 	/*
 	 * Initialize the boot-time allocator (with low memory only):
 	 */
+#ifdef CONFIG_NUMA_EMU
+	bootmap_size = init_bootmem(max(min_low_pfn, node_start_pfn[0]),
+				    min(max_low_pfn, node_end_pfn[0]));
+#else
 	bootmap_size = init_bootmem(min_low_pfn, max_low_pfn);
+#endif
 
 	register_bootmem_low_pages(max_low_pfn);
 
arch/i386/mm/numa.c +100 -0

103 lines not on this page · raw message

include/asm-i386/mmzone.h +7 -0
@@ -18,6 +18,9 @@ extern struct pglist_data *node_data[];
 	#include <asm/srat.h>
 #endif
 
+#ifdef CONFIG_NUMA_EMU
+extern int get_memcfg_numa_emu(void);
+#endif
 extern int get_memcfg_numa_flat(void );
 /*
  * This allows any one NUMA architecture to be compiled
@@ -33,6 +36,10 @@ static inline void get_memcfg_numa(void)
 	if (get_memcfg_from_srat())
 		return;
 #endif
+#ifdef CONFIG_NUMA_EMU
+	if (get_memcfg_numa_emu())
+		return;
+#endif
 
 	get_memcfg_numa_flat();
 }
include/asm-i386/numnodes.h +1 -1
@@ -8,7 +8,7 @@
 /* Max 16 Nodes */
 #define NODES_SHIFT	4
 
-#elif defined(CONFIG_ACPI_SRAT)
+#elif defined(CONFIG_ACPI_SRAT) || defined(CONFIG_NUMA_EMU)
 
 /* Max 8 Nodes */
 #define NODES_SHIFT	3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#119 lore raw

Re: [PATCH 07/07] i386: numa emulation on pc

Quoted 16 lines · Magnus Damm

void __init nid_zone_sizes_init(int nid)
{

arch/i386/kernel/setup.c +1 -8
 	unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
-	unsigned long max_dma;
+	unsigned long max_dma = min(max_hardware_dma_pfn(), max_low_pfn);
 	unsigned long start = node_start_pfn[nid];
 	unsigned long end = node_end_pfn[nid];
 
 	if (node_has_online_mem(nid)){
-		if (nid_starts_in_highmem(nid)) {
-			zones_size[ZONE_HIGHMEM] = nid_size_pages(nid);
-		} else {
-			max_dma = min(max_hardware_dma_pfn(), max_low_pfn);
-			zones_size[ZONE_DMA] = max_dma;
-			zones_size[ZONE_NORMAL] = max_low_pfn - max_dma;
-			zones_size[ZONE_HIGHMEM] = end - max_low_pfn;

arch/i386/kernel/setup.c static inline unsigned long nid_size_pa · line 1238

Quoted 10 lines
arch/i386/kernel/setup.c +8 -0
+		if (start < max_dma) {
+			zones_size[ZONE_DMA] = min(end, max_dma) - start;
+		}
+		if (start < max_low_pfn && max_dma < end) {
+			zones_size[ZONE_NORMAL] = min(end, max_low_pfn) - max(start, max_dma);
+		}
+		if (max_low_pfn <= end) {
+			zones_size[ZONE_HIGHMEM] = end - max(start, max_low_pfn);
 		}
 	}

That is a decent cleanup all by itself. You might want to break it out. Take a look at the patches I just sent out. They do some similar things to the same code.

arch/i386/kernel/setup.c void __init setup_bootmem_allocator(void · line 1281

Quoted 10 lines
arch/i386/kernel/setup.c +5 -0
@@ -1270,7 +1273,12 @@ void __init setup_bootmem_allocator(void
 	/*
 	 * Initialize the boot-time allocator (with low memory only):
 	 */
+#ifdef CONFIG_NUMA_EMU
+	bootmap_size = init_bootmem(max(min_low_pfn, node_start_pfn[0]),
+				    min(max_low_pfn, node_end_pfn[0]));
+#else
 	bootmap_size = init_bootmem(min_low_pfn, max_low_pfn);
+#endif

This shouldn't be necessary. Again, take a look at my discontig separation patches and see if what I did works for you here.

Quoted 10 lines
arch/i386/kernel/setup.c +0 -0
 	register_bootmem_low_pages(max_low_pfn);
 
arch/i386/mm/numa.c +2 -0
@@ -165,3 +165,103 @@ int early_pfn_to_nid(unsigned long pfn)
 
 	return 0;
 }
+
+#ifdef CONFIG_NUMA_EMU

...

Quoted 1 line

+#endif

Ewwwwww :) No real need to put new function in a big #ifdef like that. Can you just create a new file for NUMA emulation?

include/asm-i386/numnodes.h line 14

Quoted 11 lines
include/asm-i386/numnodes.h +1 -1
@@ -8,7 +8,7 @@
 /* Max 16 Nodes */
 #define NODES_SHIFT	4
 
-#elif defined(CONFIG_ACPI_SRAT)
+#elif defined(CONFIG_ACPI_SRAT) || defined(CONFIG_NUMA_EMU)
 
 /* Max 8 Nodes */
 #define NODES_SHIFT	3

Geez. We should probably just do those in the Kconfig files. Would look much simpler. But, that's a patch for another day. This is fine by itself.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#120 lore raw

Re: [PATCH 07/07] i386: numa emulation on pc

Hi again Dave,

Quoted 28 lines · Dave Hansen
Quoted 16 lines · Magnus Damm

void __init nid_zone_sizes_init(int nid)

 {
      unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
arch/i386/kernel/setup.c +1 -8
-     unsigned long max_dma;
+     unsigned long max_dma = min(max_hardware_dma_pfn(), max_low_pfn);
      unsigned long start = node_start_pfn[nid];
      unsigned long end = node_end_pfn[nid];
 
      if (node_has_online_mem(nid)){
-             if (nid_starts_in_highmem(nid)) {
-                     zones_size[ZONE_HIGHMEM] = nid_size_pages(nid);
-             } else {
-                     max_dma = min(max_hardware_dma_pfn(), max_low_pfn);
-                     zones_size[ZONE_DMA] = max_dma;
-                     zones_size[ZONE_NORMAL] = max_low_pfn - max_dma;
-                     zones_size[ZONE_HIGHMEM] = end - max_low_pfn;

arch/i386/kernel/setup.c static inline unsigned long nid_size_pa · line 1238

Quoted 10 lines
arch/i386/kernel/setup.c +8 -0
+             if (start < max_dma) {
+                     zones_size[ZONE_DMA] = min(end, max_dma) - start;
+             }
+             if (start < max_low_pfn && max_dma < end) {
+                     zones_size[ZONE_NORMAL] = min(end, max_low_pfn) - max(start, max_dma);
+             }
+             if (max_low_pfn <= end) {
+                     zones_size[ZONE_HIGHMEM] = end - max(start, max_low_pfn);
              }
      }
Quoted 3 lines

That is a decent cleanup all by itself. You might want to break it out. Take a look at the patches I just sent out. They do some similar things to the same code.

Break it out, sure! I'm not sure which patch to look at, though.

Quoted 5 lines
Quoted 5 lines
arch/i386/kernel/setup.c +1 -0
@@ -1270,7 +1273,12 @@ void __init setup_bootmem_allocator(void
      /*
       * Initialize the boot-time allocator (with low memory only):
       */
+#ifdef CONFIG_NUMA_EMU
Quoted 8 lines

arch/i386/kernel/setup.c void __init setup_bootmem_allocator(void · line 1281

Quoted 5 lines
arch/i386/kernel/setup.c +4 -0
+     bootmap_size = init_bootmem(max(min_low_pfn, node_start_pfn[0]),
+                                 min(max_low_pfn, node_end_pfn[0]));
+#else
      bootmap_size = init_bootmem(min_low_pfn, max_low_pfn);
+#endif

This shouldn't be necessary. Again, take a look at my discontig separation patches and see if what I did works for you here.

Do you mean "discontig-consolidate0.patch"? Maybe I'm misunderstanding.

Quoted 6 lines
Quoted 1 line
(quoted diff) +1 -0
+#ifdef CONFIG_NUMA_EMU

...

Quoted 1 line

+#endif

Ewwwwww :) No real need to put new function in a big #ifdef like that. Can you just create a new file for NUMA emulation?

Hehe, what is this, a beauty contest? =) I agree, but I guess the reason for this code to be here is that a similar arrangement is done by x86_64...

I will create a new file. Is arch/i386/mm/numa_emu.c good?

Quoted 9 lines
Quoted 9 lines
include/asm-i386/numnodes.h 2005-09-28 17:49:53.000000000 +0900 renamed from include/asm-i386/numnodes.h +1 -1
@@ -8,7 +8,7 @@
 /* Max 16 Nodes */
 #define NODES_SHIFT  4
 
-#elif defined(CONFIG_ACPI_SRAT)
+#elif defined(CONFIG_ACPI_SRAT) || defined(CONFIG_NUMA_EMU)
 
Quoted 6 lines

include/asm-i386/numnodes.h 2005-09-28 17:49:53.000000000 +0900 line 14

Quoted 2 lines
include/asm-i386/numnodes.h 2005-09-28 17:49:53.000000000 +0900 renamed from include/asm-i386/numnodes.h +0 -0
 /* Max 8 Nodes */
 #define NODES_SHIFT  3

Geez. We should probably just do those in the Kconfig files. Would look much simpler. But, that's a patch for another day. This is fine by itself.

No biggie, I will add a config option.

But first, you have written lots and lots of patches, and I am confused. Could you please tell me on which patches I should base my code to make things as easy as possible?

Many thanks,

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#121 lore raw

Re: [PATCH 07/07] i386: numa emulation on pc

Quoted 11 lines · Magnus Damm
Quoted 9 lines

arch/i386/kernel/setup.c void __init setup_bootmem_allocator(void · line 1281

Quoted 6 lines
arch/i386/kernel/setup.c +5 -0
+#ifdef CONFIG_NUMA_EMU
+     bootmap_size = init_bootmem(max(min_low_pfn, node_start_pfn[0]),
+                                 min(max_low_pfn, node_end_pfn[0]));
+#else
      bootmap_size = init_bootmem(min_low_pfn, max_low_pfn);
+#endif

This shouldn't be necessary. Again, take a look at my discontig separation patches and see if what I did works for you here.

Do you mean "discontig-consolidate0.patch"? Maybe I'm misunderstanding.

This one, I believe:

http://sr71.net/patches/2.6.14/2.6.14-rc2-git8-mhp1/broken-out/B2.1-i386-discontig-consolidation.patch

Quoted 10 lines
Quoted 6 lines
Quoted 1 line

+#ifdef CONFIG_NUMA_EMU

...

Quoted 1 line

+#endif

Ewwwwww :) No real need to put new function in a big #ifdef like that. Can you just create a new file for NUMA emulation?

Hehe, what is this, a beauty contest? =) I agree, but I guess the reason for this code to be here is that a similar arrangement is done by x86_64...

If that's really the case, can they _actually_ share code? Maybe we can do this NUMA emulation thing in non-arch code. Just guessing...

Quoted 5 lines

I will create a new file. Is arch/i386/mm/numa_emu.c good?

But first, you have written lots and lots of patches, and I am confused. Could you please tell me on which patches I should base my code to make things as easy as possible?

This is the staging ground for my memory hotplug work. But, it contains all of my work on other stuff, too. If you build on top of this, it would be great:

http://sr71.net/patches/2.6.14/2.6.14-rc2-git8-mhp1/

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#122 lore raw

Re: [PATCH 07/07] i386: numa emulation on pc

Quoted 8 lines · Dave Hansen
Quoted 7 lines · Magnus Damm
Quoted 6 lines
Quoted 1 line

+#ifdef CONFIG_NUMA_EMU

...

Quoted 1 line

+#endif

Ewwwwww :) No real need to put new function in a big #ifdef like that. Can you just create a new file for NUMA emulation?

Quoted 6 lines
Quoted 3 lines

Hehe, what is this, a beauty contest? =) I agree, but I guess the reason for this code to be here is that a similar arrangement is done by x86_64...

If that's really the case, can they _actually_ share code? Maybe we can do this NUMA emulation thing in non-arch code. Just guessing...

I'd like to avoid duplication as much as you, but at a quick glance the x86_64 and i386 architecture looked pretty different. But I will see what I can do.

Quoted 11 lines
Quoted 5 lines

I will create a new file. Is arch/i386/mm/numa_emu.c good?

But first, you have written lots and lots of patches, and I am confused. Could you please tell me on which patches I should base my code to make things as easy as possible?

This is the staging ground for my memory hotplug work. But, it contains all of my work on other stuff, too. If you build on top of this, it would be great:

http://sr71.net/patches/2.6.14/2.6.14-rc2-git8-mhp1/

I will build on top of that then.

Thanks,

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#123 lore raw

Re: [PATCH 07/07] i386: numa emulation on pc

In reply to Magnus Damm

Hi,

Quoted 4 lines

This patch adds NUMA emulation for i386 on top of the fixes for sparsemem and discontigmem. NUMA emulation already exists for x86_64, and this patch adds the same feature using the same config option CONFIG_NUMA_EMU. The kernel command line option used is also the same as for x86_64.

It seems like you've forgot to bind cpus with emulated nodes as linux for x86_64 does. I don't think it's your intention.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#124 lore raw

Re: [PATCH 07/07] i386: numa emulation on pc

Quoted 2 lines · Hirokazu Takahashi

It seems like you've forgot to bind cpus with emulated nodes as linux for x86_64 does. I don't think it's your intention.

True, not my intention. I will have a look at that. Thanks.

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#125 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

In reply to Magnus Damm
Quoted 5 lines · Magnus Damm

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

This patch set basically allows the "NUMA depends on SMP" dependency to be removed. I'm not sure this is the right approach. There will likely never be a real-world NUMA system without SMP. So, this set would seem to include some increased (#ifdef) complexity for supporting SMP && ! NUMA, which will likely never happen in the real world.

Also, I worry that simply #ifdef'ing things out like CPUsets' update means that CPUsets lacks some kind of abstraction that it should have been using in the first place. An #ifdef just papers over the real problem.

I think it would likely be cleaner if the approach was to emulate an SMP NUMA system where each NUMA node simply doesn't have all of its CPUs online.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#126 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 7 lines · Dave Hansen
Quoted 5 lines · Magnus Damm

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

Quoted 5 lines

This patch set basically allows the "NUMA depends on SMP" dependency to be removed. I'm not sure this is the right approach. There will likely never be a real-world NUMA system without SMP. So, this set would seem to include some increased (#ifdef) complexity for supporting SMP && ! NUMA, which will likely never happen in the real world.

Yes, this patch set removes "NUMA depends on SMP". It also adds some simple NUMA emulation code too, but I am sure you are aware of that! =)

I agree that it is very unlikely to find a single-processor NUMA system in the real world. So yes, "[PATCH 02/07] i386: numa on non-smp" adds _some_ extra complexity. But because SMP is set when supporting more than one cpu, and NUMA is set when supporting more than one memory node, I see no reason why they should be dependent on each other. Except that they depend on each other today and breaking them loose will increase complexity a bit.

Quoted 4 lines

Also, I worry that simply #ifdef'ing things out like CPUsets' update means that CPUsets lacks some kind of abstraction that it should have been using in the first place. An #ifdef just papers over the real problem.

Maybe. CPUSETS has two bitmaps, one for cpus and one for mems. So depending on SMP or NUMA seems logical to me. Regarding the #ifdef, it was added because partition_sched_domain() is only implemented for SMP. That symbol has no prototype or implementation when CONFIG_SMP is not set. Maybe it is better to add an empty inline function in linux/sched.h for !SMP?

Quoted 3 lines

I think it would likely be cleaner if the approach was to emulate an SMP NUMA system where each NUMA node simply doesn't have all of its CPUs online.

Absolutely. And that removes the need for some of my patches. QEMU runs SMP kernels. It is possible to run SMP kernels on UP hardware. But there is of course a certain performance loss introduced by all the SMP locks. I'd rather not force !SMP users to run SMP kernels if they want coarse-grained memory resource control.

Thanks for your input!

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#127 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

In reply to Dave Hansen
Quoted 3 lines · Dave

Also, I worry that simply #ifdef'ing things out like CPUsets' update means that CPUsets lacks some kind of abstraction that it should have been using in the first place.

In the abstract, cpusets should just assume that the system has one or more CPUs, and one or more Memory Nodes. Ideally, it should not require either SMP nor NUMA. Indeed, if you (Magnus) can get it to compile with just one or the other of those two:

config CPUSETS
bool "Cpuset support"
- depends on SMP
+ depends on SMP || NUMA

then I would hope that it would compile with neither. The cpuset hierarchy on such a system would be rather boring, with all cpusets having the same one CPU and one Memory Node, but it should work ... in theory of course.

In practice of course, there may be details on the edges that depend on the current SMP/NUMA limitations, such as:

Quoted 5 lines · Magnus

Regarding the #ifdef, it
was added because partition_sched_domain() is only implemented for SMP. That symbol has no prototype or implementation when CONFIG_SMP is not set. Maybe it is better to add an empty inline function in linux/sched.h for !SMP?

An empty inline partition_sched_domain() would be better than ifdef's in cpuset.c, yes. Or at least, that's usually the case. Probably here too.

In theory at least, I applaud Magnus's work here. The assymetry of the SMP/NUMA define structure has always annoyed me slightly, and only been explainable in my view as a consequence of the historical order of development. I had a PC with a second memory board in an ISA slot, which would qualify as a one CPU, two Memory Node system.

Or what byte us in the future (that PC was a long time ago), the kinks in the current setup might be a hitch in our side as we extend to increasingly interesting architectures.

Aside - for those reading this thread on lkml, it originated on linux-mm. It looks like Dave added lkml to the cc list.

Signature · 9 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#128 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 15 lines · Paul Jackson
Quoted 3 lines · Dave

Also, I worry that simply #ifdef'ing things out like CPUsets' update means that CPUsets lacks some kind of abstraction that it should have been using in the first place.

In the abstract, cpusets should just assume that the system has one or more CPUs, and one or more Memory Nodes. Ideally, it should not require either SMP nor NUMA. Indeed, if you (Magnus) can get it to compile with just one or the other of those two:

config CPUSETS
bool "Cpuset support"
- depends on SMP
+ depends on SMP || NUMA

Quoted 4 lines

then I would hope that it would compile with neither. The cpuset hierarchy on such a system would be rather boring, with all cpusets having the same one CPU and one Memory Node, but it should work ... in theory of course.

I just tested this on top of my patches:
@@ -245,7 +245,6 @@ config IKCONFIG_PROC

config CPUSETS
bool "Cpuset support"
- depends on SMP || NUMA
help

and it seems to work ok in practice too. On a regular !SMP !NUMA PC anyway. As you note, the hierarchy is not that exciting. =) Anyway, both SMP || NUMA or nothing seems to work as dependencies. After partition_sched_domain() gets fixed that is.

Quoted 10 lines

In practice of course, there may be details on the edges that depend on the current SMP/NUMA limitations, such as:

Quoted 5 lines · Magnus

Regarding the #ifdef, it
was added because partition_sched_domain() is only implemented for SMP. That symbol has no prototype or implementation when CONFIG_SMP is not set. Maybe it is better to add an empty inline function in linux/sched.h for !SMP?

Quoted 3 lines

An empty inline partition_sched_domain() would be better than ifdef's in cpuset.c, yes. Or at least, that's usually the case. Probably here too.

I agree.

Quoted 9 lines

In theory at least, I applaud Magnus's work here. The assymetry of the SMP/NUMA define structure has always annoyed me slightly, and only been explainable in my view as a consequence of the historical order of development. I had a PC with a second memory board in an ISA slot, which would qualify as a one CPU, two Memory Node system.

Or what byte us in the future (that PC was a long time ago), the kinks in the current setup might be a hitch in our side as we extend to increasingly interesting architectures.

Nice to hear that you like the idea.

Maybe I should have broken down my patches into three smaller sets:

1) i386: NUMA without SMP
2) CPUSETS: NUMA || SMP
3) i386: NUMA emulation

If people like 1) then it's probably a good idea to convert other architectures too. Both 2) and 3) above are separate but related issues. And now seems like a good time to solve 2).

So, Paul, please let me know if you prefer SMP || NUMA or no depencencies in the Kconfig. When I know that I will create a new patch that hopefully can get into -mm later on.

Quoted 2 lines

Aside - for those reading this thread on lkml, it originated on linux-mm. It looks like Dave added lkml to the cc list.

Huh? I sent my patches both to lkml and linux-mm...

Thank you for the feedback!

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#129 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Hi,

Quoted 18 lines
Quoted 9 lines

In theory at least, I applaud Magnus's work here. The assymetry of the SMP/NUMA define structure has always annoyed me slightly, and only been explainable in my view as a consequence of the historical order of development. I had a PC with a second memory board in an ISA slot, which would qualify as a one CPU, two Memory Node system.

Or what byte us in the future (that PC was a long time ago), the kinks in the current setup might be a hitch in our side as we extend to increasingly interesting architectures.

Nice to hear that you like the idea.

Maybe I should have broken down my patches into three smaller sets:

1) i386: NUMA without SMP
2) CPUSETS: NUMA || SMP
3) i386: NUMA emulation

Quoted 7 lines

If people like 1) then it's probably a good idea to convert other architectures too. Both 2) and 3) above are separate but related issues. And now seems like a good time to solve 2).

So, Paul, please let me know if you prefer SMP || NUMA or no depencencies in the Kconfig. When I know that I will create a new patch that hopefully can get into -mm later on.

The latter seems a good idea to me if you're going to enhance CPUSETS acceptable for CPUMETER or something like that.

Thanks.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#130 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

In reply to Magnus Damm
Quoted 2 lines · Magnus

So, Paul, please let me know if you prefer SMP || NUMA or no depencencies in the Kconfig.

In theory, I prefer none. But the devil is in the details here, and I really don't care that much.

So pick whichever you prefer, or whichever provides the nicest looking code or patch, or flip a coin ;).

Signature · 9 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#131 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 9 lines · Paul Jackson
Quoted 2 lines · Magnus

So, Paul, please let me know if you prefer SMP || NUMA or no depencencies in the Kconfig.

In theory, I prefer none. But the devil is in the details here, and I really don't care that much.

So pick whichever you prefer, or whichever provides the nicest looking code or patch, or flip a coin ;).

I'm tempted to consult the magic eight-ball, but I think I will stick with the advice from Takahashi-san instead. =) So, the dependency will be removed.

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#132 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 1 line · Magnus

I think I will stick with the advice from Takahashi-san

Yes - Takahashi-san gives much better advice than an eight-ball.

Signature · 9 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#133 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

In reply to Magnus Damm
Quoted 1 line · Magnus

I sent my patches both to lkml and linux-mm...

Must be confusion on my end then. Sorry.

Signature · 9 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#135 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 18 lines · Magnus Damm
Quoted 7 lines · Dave Hansen
Quoted 5 lines · Magnus Damm

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

Quoted 5 lines

This patch set basically allows the "NUMA depends on SMP" dependency to be removed. I'm not sure this is the right approach. There will likely never be a real-world NUMA system without SMP. So, this set would seem to include some increased (#ifdef) complexity for supporting SMP && ! NUMA, which will likely never happen in the real world.

Yes, this patch set removes "NUMA depends on SMP". It also adds some simple NUMA emulation code too, but I am sure you are aware of that! =)

Quoted 7 lines

I agree that it is very unlikely to find a single-processor NUMA system in the real world. So yes, "[PATCH 02/07] i386: numa on non-smp" adds _some_ extra complexity. But because SMP is set when supporting more than one cpu, and NUMA is set when supporting more than one memory node, I see no reason why they should be dependent on each other. Except that they depend on each other today and breaking them loose will increase complexity a bit.

hmm, observation from the peanut gallery, would it make sene to look at useing the NUMA code on single proc machines that use PAE to access more then 4G or ram on a 32 bit system?

David Lang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#136 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 28 lines · David Lang
Quoted 18 lines · Magnus Damm
Quoted 7 lines · Dave Hansen
Quoted 5 lines · Magnus Damm

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

Quoted 5 lines

This patch set basically allows the "NUMA depends on SMP" dependency to be removed. I'm not sure this is the right approach. There will likely never be a real-world NUMA system without SMP. So, this set would seem to include some increased (#ifdef) complexity for supporting SMP && ! NUMA, which will likely never happen in the real world.

Yes, this patch set removes "NUMA depends on SMP". It also adds some simple NUMA emulation code too, but I am sure you are aware of that! =)

Quoted 7 lines

I agree that it is very unlikely to find a single-processor NUMA system in the real world. So yes, "[PATCH 02/07] i386: numa on non-smp" adds _some_ extra complexity. But because SMP is set when supporting more than one cpu, and NUMA is set when supporting more than one memory node, I see no reason why they should be dependent on each other. Except that they depend on each other today and breaking them loose will increase complexity a bit.

Quoted 3 lines

hmm, observation from the peanut gallery, would it make sene to look at useing the NUMA code on single proc machines that use PAE to access more then 4G or ram on a 32 bit system?

Hm, maybe? =) What would you like to accomplish by that?

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#137 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 37 lines · Magnus Damm

Date: Mon, 3 Oct 2005 19:02:08 +0900
From: Magnus Damm <[email protected]>
To: David Lang <[email protected]>
Cc: Dave Hansen <[email protected]>, Magnus Damm <[email protected]>,
linux-mm <[email protected]>,
Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 28 lines · David Lang
Quoted 25 lines · Magnus Damm
Quoted 7 lines · Dave Hansen
Quoted 5 lines · Magnus Damm

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

Quoted 5 lines

This patch set basically allows the "NUMA depends on SMP" dependency to be removed. I'm not sure this is the right approach. There will likely never be a real-world NUMA system without SMP. So, this set would seem to include some increased (#ifdef) complexity for supporting SMP && ! NUMA, which will likely never happen in the real world.

Yes, this patch set removes "NUMA depends on SMP". It also adds some simple NUMA emulation code too, but I am sure you are aware of that! =)

I agree that it is very unlikely to find a single-processor NUMA system in the real world. So yes, "[PATCH 02/07] i386: numa on non-smp" adds _some_ extra complexity. But because SMP is set when supporting more than one cpu, and NUMA is set when supporting more than one memory node, I see no reason why they should be dependent on each other. Except that they depend on each other today and breaking them loose will increase complexity a bit.

Quoted 5 lines
Quoted 3 lines

hmm, observation from the peanut gallery, would it make sene to look at useing the NUMA code on single proc machines that use PAE to access more then 4G or ram on a 32 bit system?

Hm, maybe? =) What would you like to accomplish by that?

if nothing else preferential use of 'local' (non PAE) memory over 'remote' (PAE) memory for programs, while still useing it all as needed.

this may be done already, but this type of difference between the access speed of different chunks of ram seems to be exactly the type of thing that the NUMA code solves the general case for. I'm thinking that it may end up simplifying things if the same general-purpose logic will work for the specific case of PAE instead of it being hard coded as a special case.

it also just struck me as the most obvious example of where a UP box could have a NUMA-like memory arrangement (and therefor a case to justify decoupling the SMP and NUMA options)

David Lang

Quoted 2 lines

/ magnus

Signature · 8 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#138 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 2 lines

if nothing else preferential use of 'local' (non PAE) memory over 'remote' (PAE) memory for programs, while still useing it all as needed.

Why would you want to do that? ;-)

Quoted 3 lines

this may be done already, but this type of difference between the access speed of different chunks of ram seems to be exactly the type of thing that the NUMA code solves the general case for.

It is!

Quoted 4 lines

I'm thinking that it
may end up simplifying things if the same general-purpose logic will work for the specific case of PAE instead of it being hard coded as a special case.

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

M.

#139 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

In reply to David Lang

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 00:34:40 -0700):

Quoted 28 lines · Magnus Damm
Quoted 19 lines · Dave Hansen
Quoted 7 lines · Magnus Damm
Quoted 5 lines

These patches implement NUMA memory node emulation for regular i386 PC:s.

NUMA emulation could be used to provide coarse-grained memory resource control using CPUSETS. Another use is as a test environment for NUMA memory code or CPUSETS using an i386 emulator such as QEMU.

Quoted 5 lines

This patch set basically allows the "NUMA depends on SMP" dependency to be removed. I'm not sure this is the right approach. There will likely never be a real-world NUMA system without SMP. So, this set would seem to include some increased (#ifdef) complexity for supporting SMP && ! NUMA, which will likely never happen in the real world.

Yes, this patch set removes "NUMA depends on SMP". It also adds some simple NUMA emulation code too, but I am sure you are aware of that! =)

Quoted 7 lines

I agree that it is very unlikely to find a single-processor NUMA system in the real world. So yes, "[PATCH 02/07] i386: numa on non-smp" adds _some_ extra complexity. But because SMP is set when supporting more than one cpu, and NUMA is set when supporting more than one memory node, I see no reason why they should be dependent on each other. Except that they depend on each other today and breaking them loose will increase complexity a bit.

Quoted 3 lines

hmm, observation from the peanut gallery, would it make sene to look at useing the NUMA code on single proc machines that use PAE to access more then 4G or ram on a 32 bit system?

2 problems:

1) there aren't any ;-)
2) The memory is not physically differently separated from the CPUs, so it's not NUMA.

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#140 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 12 lines · Martin J. Bligh
Quoted 11 lines
Quoted 7 lines

I agree that it is very unlikely to find a single-processor NUMA system in the real world. So yes, "[PATCH 02/07] i386: numa on non-smp" adds _some_ extra complexity. But because SMP is set when supporting more than one cpu, and NUMA is set when supporting more than one memory node, I see no reason why they should be dependent on each other. Except that they depend on each other today and breaking them loose will increase complexity a bit.

hmm, observation from the peanut gallery, would it make sene to look at useing the NUMA code on single proc machines that use PAE to access more then 4G or ram on a 32 bit system?

Quoted 5 lines

2 problems:

1) there aren't any ;-)
2) The memory is not physically differently separated from the CPUs, so it's not NUMA.

even though it's not physically differently seperated from the CPU(s) doesn't it's differing performance amount to the same thing?

David Lang

Signature · 8 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#141 lore raw

Re: AIO Support for kernel 2.6.11 ??????

In reply to a message not in the archive

Patch support for 2.6.11 was terminated when 2.6.12 was released (and support for 2.6.12 was then terminated when 2.6.13 was released)

this is the way kernel development works.

anyone (including you) is allowed to pick a release and provide patch support for i, including backporting features from later kernels. most distributions do this to a greater or lesser degree.

don't expect patches from leter kernels to apply cleanly. if they do you are lucky, if they don't then you need to apply the 'modification; you mention in point3 until they do work, however you will be pretty much on your own for doing that work.

I can't answer your specific questions about AIO so I'll leave it at that.

David Lang

Quoted 44 lines · vikas gupta

Date: Mon, 3 Oct 2005 08:55:19 +0100 (BST)
From: vikas gupta <[email protected]>
To: [email protected], [email protected], [email protected],
[email protected], [email protected]
Subject: AIO Support for kernel 2.6.11 ??????

hi All

1) I like to ask why patch support is not provided for 2.6.11 kernel....

2) What needs to be done in order to use 2.6.11 kernel with full AIO Support

3) Is it possible to apply 2.6.13-rc6-B0-all.diff patch provided by ben to2.6.11 kernel after some modification,and if that is done whether i be able to get full kernel AIO Support

4) if i applied suparna's patches with linux-2.6.12-PAIO-0.6.tar on linux-2.6.12-rc6 kernel,I am getting Some errors with respect to suparna's patches.Thay are not getting applied cleanly... So i am trying to manually applied them ...but will i be able to Full AIO Support after
applying those patches on linux-2.6.12-rc6 .

vikas

__________________________________________________________
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
-
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/

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#142 lore raw

Re: I request inclusion of SAS Transport Layer and AIC-94xx intothe kernel

In reply to a message not in the archive
Quoted 10 lines · Luben Tuikov
Quoted 7 lines

The SAS transport class supports commonality across all SAS implementations. This includes both MPT and Adaptec 94xx.

SAS transport class + libsas supports software implementations of SAS, including transport layer management. This includes Adaptec 94xx but NOT MPT.

You almost get it right, other than the layering infrastructure.

Quoted 7 lines

The SAS Transport Layer is a layer in its own right. It is not a "libsas".

MPT and open transport a very different, one hides the transport, i.e. the transport layer is in firmware; the other exposes it and needs a transport layer. See the pictures here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=112810649712793&w=2

in this case wouldn't it be trivial to write a 'null transport' driver that just passed things down to the card to let the firmware deal with it? (reformatting the data if needed)

having a null driver for a layer for some hardware, and a much more complex driver for the same layer for other hardware is fairly common in Linux. I believe ti was Linus that said in an interview that Linux is now largely designed for an ideal abstracted CPU, with code put in on the architectures that don't have a feature to simulate that feature in software.

David Lang

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#143 lore raw

Re: I request inclusion of SAS Transport Layer and AIC-94xx intothe kernel

Quoted 3 lines · David Lang

in this case wouldn't it be trivial to write a 'null transport' driver that just passed things down to the card to let the firmware deal with it? (reformatting the data if needed)

Hi David,

I think it is trivial.

Your LLDD would define the host template and register it with SCSI Core. This way you _bypass_ the Transport Layer. (This is what you call null driver -- as is traditionally done in SCSI Core due to the legacy LLDDs (to which MPT caters for 100% backward software compatibility))

Else if your LLDD is just an inteface to the interconnect:
i.e. it only implements Execute SCSI RPC and TMFs, then you'd register with the Transport Layer (SBP or USB or SAS) which will do all Transport related tasks, and then that Transport Layer (USB, SBP or SAS) would register a scsi host with SCSI Core.

Luben

Quoted 9 lines

having a null driver for a layer for some hardware, and a much more complex driver for the same layer for other hardware is fairly common in Linux. I believe ti was Linus that said in an interview that Linux is now largely designed for an ideal abstracted CPU, with code put in on the architectures that don't have a feature to simulate that feature in software.

David Lang

#144 lore raw

Re: I request inclusion of SAS Transport Layer and AIC-94xx intothekernel

Quoted 15 lines · Luben Tuikov
Quoted 3 lines · David Lang

in this case wouldn't it be trivial to write a 'null transport' driver that just passed things down to the card to let the firmware deal with it? (reformatting the data if needed)

Hi David,

I think it is trivial.

Your LLDD would define the host template and register it with SCSI Core. This way you _bypass_ the Transport Layer. (This is what you call null driver -- as is traditionally done in SCSI Core due to the legacy LLDDs (to which MPT caters for 100% backward software compatibility))

Quoted 6 lines

Else if your LLDD is just an inteface to the interconnect:
i.e. it only implements Execute SCSI RPC and TMFs, then you'd register with the Transport Layer (SBP or USB or SAS) which will do all Transport related tasks, and then that Transport Layer (USB, SBP or SAS) would register a scsi host with SCSI Core.

the advantage of actually having a null transport driver rather then bypassing the transport layer completely is that you avoid having to make the SCSI core know about details of the interface to the chips, and especially about any bugs that crop up and have to be worked around for different chips.

or worse yet, as the spec of the interface to the hardware changes over time the SCSI core would have to know about all the different variations and how to deal with them.

it's much cleaner to evict all that knowledge out of the SCSI core and let a very lightweight transport driver deal with that instead.

the drawback is that you may end up copying a little bit of data one time more then you absolutly have to, but that's probably a very small cost for the flexibility.

think of this as a problem similar to the network card interface, vendors want to implement TOE while the kernel folks are willing to do TSO, but not TOE (see the letters being exchange on lwn.net in the letters to the editor section the last few weeks for a good discussion on those issues)

David Lang

#145 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

In reply to a message not in the archive
Quoted 4 lines · Martin J. Bligh

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

is it? I've seen during the memory self-test at boot that machines slow down noticably as they pass the 4G mark.

David Lang

Signature · 8 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#146 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:03:44 -0700):

Quoted 8 lines · Martin J. Bligh
Quoted 5 lines

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

is it? I've seen during the memory self-test at boot that machines slow down noticably as they pass the 4G mark.

Not noticed that, and I can't see why it should be the case in general, though I suppose some machines might be odd. Got any numbers?

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#147 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 9 lines · Martin J. Bligh

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:03:44 -0700):

Quoted 7 lines · Martin J. Bligh
Quoted 5 lines

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

Quoted 4 lines
Quoted 1 line

is it? I've seen during the memory self-test at boot that machines slow down noticably as they pass the 4G mark.

Not noticed that, and I can't see why it should be the case in general, though I suppose some machines might be odd. Got any numbers?

just the fact that the system boot memory test takes 3-4 times as long with 8G or ram then with 4G of ram. I then boot a 64 bit kernel on the system and never use PAE mode again :-)

if you can point me at a utility that will test the speed of the memory in different chunks I'll do some testing on the Opteron systems I have available. unfortunantly I don't have any Xeon systems to test this on.

David Lang

Signature · 8 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#148 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:13:09 -0700):

Quoted 11 lines · Martin J. Bligh
Quoted 10 lines

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:03:44 -0700):

Quoted 7 lines · Martin J. Bligh
Quoted 5 lines

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

is it? I've seen during the memory self-test at boot that machines slow down noticably as they pass the 4G mark.

Not noticed that, and I can't see why it should be the case in general, though I suppose some machines might be odd. Got any numbers?

just the fact that the system boot memory test takes 3-4 times as long with 8G or ram then with 4G of ram. I then boot a 64 bit kernel on the system and never use PAE mode again :-)

if you can point me at a utility that will test the speed of the memory in different chunks I'll do some testing on the Opteron systems I have available. unfortunantly I don't have any Xeon systems to test this on.

Mmm. 64-bit uniproc systems, with > 4GB of RAM, running a 32 bit kernel don't really strike me as a huge market segment ;-)

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#149 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 18 lines · Martin J. Bligh

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:13:09 -0700):

Quoted 16 lines · Martin J. Bligh
Quoted 14 lines

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:03:44 -0700):

Quoted 8 lines · Martin J. Bligh
Quoted 5 lines

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

is it? I've seen during the memory self-test at boot that machines slow down noticably as they pass the 4G mark.

Not noticed that, and I can't see why it should be the case in general, though I suppose some machines might be odd. Got any numbers?

Quoted 6 lines
Quoted 3 lines

just the fact that the system boot memory test takes 3-4 times as long with 8G or ram then with 4G of ram. I then boot a 64 bit kernel on the system and never use PAE mode again :-)

if you can point me at a utility that will test the speed of the memory in different chunks I'll do some testing on the Opteron systems I have available. unfortunantly I don't have any Xeon systems to test this on.

Mmm. 64-bit uniproc systems, with > 4GB of RAM, running a 32 bit kernel don't really strike me as a huge market segment ;-)

true, but there are a lot of 32-bit uniproc systems sold by Intel that have (or can have) more then 4G of ram. These are the machines I was thinking of.

David Lang

Signature · 8 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#150 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:32:47 -0700):

Quoted 20 lines · Martin J. Bligh
Quoted 19 lines

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:13:09 -0700):

Quoted 16 lines · Martin J. Bligh
Quoted 14 lines

--David Lang <[email protected]> wrote (on Monday, October 03, 2005 08:03:44 -0700):

Quoted 8 lines · Martin J. Bligh
Quoted 5 lines

But that's not the same at all! ;-) PAE memory is the same speed as the other stuff. You just have a 3rd level of pagetables for everything. One could (correctly) argue it made *all* memory slower, but it does so in a uniform fashion.

is it? I've seen during the memory self-test at boot that machines slow down noticably as they pass the 4G mark.

Not noticed that, and I can't see why it should be the case in general, though I suppose some machines might be odd. Got any numbers?

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

just the fact that the system boot memory test takes 3-4 times as long with 8G or ram then with 4G of ram. I then boot a 64 bit kernel on the system and never use PAE mode again :-)

if you can point me at a utility that will test the speed of the memory in different chunks I'll do some testing on the Opteron systems I have available. unfortunantly I don't have any Xeon systems to test this on.

Mmm. 64-bit uniproc systems, with > 4GB of RAM, running a 32 bit kernel don't really strike me as a huge market segment ;-)

true, but there are a lot of 32-bit uniproc systems sold by Intel that have (or can have) more then 4G of ram. These are the machines I was thinking of.

Does your opteron box have more than 1 socket? that'd explain it.

Anyway, it shouldn't happen on any normal platform. Until we get numbers that prove that it does (and understand why), I don't think we need NUMA for PAE.

M.

#151 lore raw

Re: [PATCH 00/07][RFC] i386: NUMA emulation

Quoted 6 lines · Martin J. Bligh
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Not noticed that, and I can't see why it should be the case in general, though I suppose some machines might be odd. Got any numbers?

just the fact that the system boot memory test takes 3-4 times as long with 8G or ram then with 4G of ram. I then boot a 64 bit kernel on the system and never use PAE mode again :-)

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

if you can point me at a utility that will test the speed of the memory in different chunks I'll do some testing on the Opteron systems I have available. unfortunantly I don't have any Xeon systems to test this on.

Mmm. 64-bit uniproc systems, with > 4GB of RAM, running a 32 bit kernel don't really strike me as a huge market segment ;-)

true, but there are a lot of 32-bit uniproc systems sold by Intel that have (or can have) more then 4G of ram. These are the machines I was thinking of.

Does your opteron box have more than 1 socket? that'd explain it.

yes, but I see the same 4G breakpoint no matter what the memory config (including one dual proc machine with 16G, if it was a matter of hitting memory connected to the other socket I would expect the slowdown at 8G, not at 4G)

Quoted 3 lines

Anyway, it shouldn't happen on any normal platform. Until we get numbers that prove that it does (and understand why), I don't think we need NUMA for PAE.

Ok, if nobody else is seeing any slowdown.

David Lang

Signature · 8 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#154 lore raw

Re: large files unnecessary trashing filesystem cache?

Quoted 1 line · Badari Pulavarty

On Tue, 2005-10-18 at 22:01 +0200, Guido Fiala wrote:

[large files trash cache]

Quoted 1 line

Is there a reason why those applications couldn't use O_DIRECT ?

The cache trashing will affect all programs handling large files:

mkisofs * > iso
dd < /dev/hdx42 | gzip > imagefile
perl -pe's/filenamea/filenameb/' < iso | cdrecord - # <- never tried

Changing a few programs will only partly cover the problems.

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
#155 lore raw

Re: large files unnecessary trashing filesystem cache?

Quoted 5 lines · Bodo Eggert
Quoted 1 line · Badari Pulavarty

On Tue, 2005-10-18 at 22:01 +0200, Guido Fiala wrote:

[large files trash cache]

Quoted 8 lines
Quoted 1 line

Is there a reason why those applications couldn't use O_DIRECT ?

The cache trashing will affect all programs handling large files:

mkisofs * > iso
dd < /dev/hdx42 | gzip > imagefile
perl -pe's/filenamea/filenameb/' < iso | cdrecord - # <- never tried

Are these examples which demonstrate the thrashing problem. Few product (database) groups here are trying to get me to work on a solution before demonstrating the problem. They also claim exactly what you are saying. They want a control on how many pages (per process or per file or per filesystem or system wide) you can have in filesystem cache.

Thats why I am pressing to find out the real issue behind this. If you have a demonstratable testcase, please let me know. I will be happy to take a look.

Quoted 5 lines

Changing a few programs will only partly cover the problems.

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Read-only pages should be re-cycled really easily & quickly. I can't belive read-only pages are causing you all the trouble.

Thanks,
Badari

#156 lore raw

Re: large files unnecessary trashing filesystem cache?

Quoted 10 lines · Badari Pulavarty
Quoted 5 lines · Bodo Eggert

Changing a few programs will only partly cover the problems.

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Read-only pages should be re-cycled really easily & quickly. I can't belive read-only pages are causing you all the trouble.

I don't think the file is marked read-only ... that is when it is accessed for reading the cache will contain the new file data and the previous cached data will be lost .... So how u can say that read-only pages or read-pages are not causing the problem ??

And I think the large files trashing filesystem caching problem can be handled by the application using direct I/O or that must and might already be managed by the file-system it-self because I think besides application and file-system there isn't any thing present which can detect the file currently accessing is a large file (as underlying layer deals with blocks of data, or at block level with sectors and u can't say what kind of data it is) ....

Is I m correct ??? or missing something ??

--
Fawad Lateef

#157 lore raw

Re: large files unnecessary trashing filesystem cache?

Quoted 1 line · In article <[email protected]> you…

Is I m correct ??? or missing something ??

Well, applications who know the file is not going to be cached should clearly give that hint. someheuristics in detecting "streaming one time" access is usefull, however a more strict limitation on process level would make the system more sane and stop single files from occupying most of the block buffer.

Gruss
Bernd
y

#158 lore raw

Re: large files unnecessary trashing filesystem cache?

In reply to Badari Pulavarty
Quoted 8 lines · Badari Pulavarty
Quoted 7 lines · Bodo Eggert
Quoted 1 line · Badari Pulavarty

On Tue, 2005-10-18 at 22:01 +0200, Guido Fiala wrote:

[large files trash cache]

Quoted 1 line

Is there a reason why those applications couldn't use O_DIRECT ?

Quoted 8 lines
Quoted 6 lines

The cache trashing will affect all programs handling large files:

mkisofs * > iso
dd < /dev/hdx42 | gzip > imagefile
perl -pe's/filenamea/filenameb/' < iso | cdrecord - # <- never tried

Are these examples which demonstrate the thrashing problem.

You can alyo cat a big file into /dev/null. I made those examples in order to demonstrate the problem with using O_DIRECT.

OTOH, I don't realtime stuff on my computer, so I'm not really affected, but I'll try to show it anyway.

Quoted 8 lines
Quoted 5 lines

Changing a few programs will only partly cover the problems.

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Read-only pages should be re-cycled really easily & quickly. I can't belive read-only pages are causing you all the trouble.

Just a q&d test:

$ time ls -l $DIR > /dev/null
real    0m0.442s
user    0m0.008s
sys     0m0.024s
$ time ls -l $DIR > /dev/null
real    0m0.077s
user    0m0.008s
sys     0m0.008s

cat $BIGFILES_1.5GB > /Dev/null

$ time ls -l $DIR > /dev/null
real    0m0.270s
user    0m0.008s
sys     0m0.008s
$ time ls -l $DIR > /dev/null
real    0m0.078s
user    0m0.004s
sys     0m0.004s

BTW:
I suggested the random eviction because it will evict pages from large files more likely than pages from small files, but I now think it will cause the evicted pages to be non-continuous, too, and thereby cause rereading them to be slower. I don't know which effect would be worse.

Signature · 1 line
Is reading in the bathroom considered Multitasking? 
#159 lore raw

Re: large files unnecessary trashing filesystem cache?

Zitat von Bodo Eggert <[email protected]>:

Quoted 2 lines

You can alyo cat a big file into /dev/null. I made those examples in order to demonstrate the problem with using O_DIRECT.

O_DIRECT has to much impact at the mentioned "vdr" due to unwanted side effects either.

Quoted 32 lines

OTOH, I don't realtime stuff on my computer, so I'm not really affected, but I'll try to show it anyway.

Quoted 8 lines
Quoted 5 lines

Changing a few programs will only partly cover the problems.

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Read-only pages should be re-cycled really easily & quickly. I can't belive read-only pages are causing you all the trouble.

Just a q&d test:

$ time ls -l $DIR > /dev/null
real    0m0.442s
user    0m0.008s
sys     0m0.024s
$ time ls -l $DIR > /dev/null
real    0m0.077s
user    0m0.008s
sys     0m0.008s

cat $BIGFILES_1.5GB > /Dev/null

$ time ls -l $DIR > /dev/null
real    0m0.270s
user    0m0.008s
sys     0m0.008s
Quoted 6 lines
$ time ls -l $DIR > /dev/null
real    0m0.078s
user    0m0.004s
sys     0m0.004s

Thanks for pointing this out - this clearly shows the effect.
Now consider a mildly loaded multitasking environment running X, some services, window-manager, email, maybe some databases and a streaming video-application at once (so does mine) - the video-file will have unwanted impact on all the other applications - leading to unnecessary reloads of lots of files, inodes etc.

#160 lore raw

Re: large files unnecessary trashing filesystem cache?

In reply to Bodo Eggert
Quoted 5 lines · Bodo Eggert

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Instead of random cache eviction, you can make pages that were read in contiguously age faster than pages that were read in singly.

The motivation is that the cost of reading 64K vs 4K is almost the same (most of the cost is the seek), while the benefit for evicting 64K is 16 times that of evicting 4K. Over time, the kernel would favor expensive random-access pages over cheap streaming pages.

In a way, this is already implemented for inodes, which are aged more slowly than data pages.

#161 lore raw

Re: large files unnecessary trashing filesystem cache?

In reply to a message not in the archive
Quoted 27 lines · Badari Pulavarty
Quoted 5 lines · Bodo Eggert
Quoted 1 line · Badari Pulavarty

On Tue, 2005-10-18 at 22:01 +0200, Guido Fiala wrote:

[large files trash cache]

Quoted 8 lines
Quoted 1 line

Is there a reason why those applications couldn't use O_DIRECT ?

The cache trashing will affect all programs handling large files:

mkisofs * > iso
dd < /dev/hdx42 | gzip > imagefile
perl -pe's/filenamea/filenameb/' < iso | cdrecord - # <- never tried

Are these examples which demonstrate the thrashing problem. Few product (database) groups here are trying to get me to work on a solution before demonstrating the problem. They also claim exactly what you are saying. They want a control on how many pages (per process or per file or per filesystem or system wide) you can have in filesystem cache.

Thats why I am pressing to find out the real issue behind this. If you have a demonstratable testcase, please let me know. I will be happy to take a look.

Quoted 8 lines
Quoted 5 lines

Changing a few programs will only partly cover the problems.

I guess the solution would be using random cache eviction rather than a FIFO. I never took a look the cache mechanism, so I may very well be wrong here.

Read-only pages should be re-cycled really easily & quickly. I can't belive read-only pages are causing you all the trouble.

the problem is that there are many sources of read-only pages (how many shared library pages are not read-only for example) and not all of them are of equal value to the system

the ideal situation would probably be something like the adaptive read-ahead approach where the system balances the saved pages between processes/files rather then just benifiting the process that uses pages the fastest.

I don't have any idea how to implement this sanely without a horrible performance hit due to recordkeeping, but someone else may have a better idea.

thinking out loud here, how bad would it be to split the LRU list based on the number of things that have a page mapped? even if it only split it into a small number of lists (say even just 0, 1+) and then evicted pages from the 0 list in prefrence to the 1+ list (or at least add a fixed value to the age of the 0 pages to have them age faster). this would limit how badly library and code pages get evicted by a large file access.

David Lang

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#162 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

In reply to a message not in the archive
Quoted 7 lines · Stefan Richter
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · Stefan Richter

A. Post mock-ups and pseudo code about how to change the core, discuss. B. Set up a scsi-cleanup tree. In this tree,
1. renovate the core (thereby break all command set drivers and all transport subsystems),

Quoted 8 lines
Quoted 4 lines

No way. Doing things from scatch is a really bad idea. See how far we came with Linux 2.6 scsi vs 2.4 scsi without throwing everything away and break the world. Please submit changes to fix _one_ thing at a time and fix all users. Repeat until done or you don't care anymore.

I agree with you. Alas my wording was misunderstandable und obviously carried a wrong tone.

I did not say "replace the core" in step 1. Also, the breakage which I refer to in step 1 would have to be immediately corrected in step 2 (although not for the whole subsystem at once, to allow for a fast cycle of validation of what happened in step 1). Furthermore I specifically said that most steps may (let me add: and should) overlap.

Stefan,
we are supposed to be on a 2-month release cycle, with all major changes
going in in the first two weeks of that cycle. This timeframe doesn't leave you any noticable time to implement your steps seperatly (and zero testing between them). as a result, in practice your proposal amounts to a big-bang approach, and/or results in releases that are known-broken.

and while you suggest putting this in -mm, remember that the -mm kernel needs to be useable so that people can test it, and it is on the same schedule as the main kernel so again you can't have known-broken things (of this scale) there either.

David Lang

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#163 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

Quoted 3 lines · David Lang

Stefan,
we are supposed to be on a 2-month release cycle, with all major
changes going in in the first two weeks of that cycle. This timeframe doesn't leave you any noticable time to implement your steps seperatly (and zero testing between them). as a result, in practice your proposal amounts to a big-bang approach, and/or results in releases that are known-broken.

Experimental branches of subsystems usually cannot (nor need to) be bound to a release cycle.

Quoted 1 line

and while you suggest putting this in -mm, remember that the -mm kernel needs to be useable so that people can test it, and it is on the same schedule as the main kernel so again you can't have known-broken things (of this scale) there either.

I assumed there would be a few unmaintained bits (of marginal "scale") left which could not be updated, but it seems now that won't be the case.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- ==--=
http://arcgraph.de/sr/
#164 lore raw

Re: [patch 00/43] ktimer reworked

In reply to a message not in the archive
Quoted 8 lines · Roman Zippel

Hi,

Quoted 1 line · Kyle Moffett

My _point_ is that some code doesn't care about accuracy.

That's not how it works, the timer wheel is accurate within its resolution.

but the point that is being made is that while this is true, there is a large group of functions that really don't care (the timeout case), and for that type of use it's possible to do some optimizations that make it extremely efficiant.

In addition, once you remove the bulk of these uses from the picture (by makeing them use a new timer type that's optimized for their useage pattern, the 'unlikly to expire' case) the remainder of the timer users easily fall into the catagory where the timer is expected to expire, so that code can accept a performance hit for removing events prior to them going off that would not be acceptable in a general case version.

the example of this is the networking timers. they almost never go off, but one is set for just about every packet that's processed. so adding any overhead in removing the unexpired timer has a large impact on performance.

but once this large group of timer users are removed, (along with a few other similar watchdog timers for disk I/O, etc) the remaining users will almost never remove the event before it goes off, so the code can be optimized for that situation (including things that would increase the cost to remove the unexpired event) and gain precision and possibly performance as well.

would the term 'watchdog' or 'watchdog_timer' for what's been refered to as the timeout timer make more sense to people? it's used when you need to setup a safety net around the possibility that an event won't happen, it's guarenteed not to fire before the time specified, but may have it's activation delayed slightly past that point.

then the rest of the uses could use the term 'timer', and that code is optimized for the timer actually expireing, removing an event that has not expired will be relativly costly.

David Lang

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#165 lore raw

Re: [patch 00/43] ktimer reworked

Hi,

Quoted 6 lines · David Lang

In addition, once you remove the bulk of these uses from the picture (by makeing them use a new timer type that's optimized for their useage pattern, the 'unlikly to expire' case) the remainder of the timer users easily fall into the catagory where the timer is expected to expire, so that code can accept a performance hit for removing events prior to them going off that would not be acceptable in a general case version.

Guys, before you continue spreading nonsense, please read carefully Ingos description of the timer wheel at http://lwn.net/Articles/156329/ . Let me also refine the statement I made in this mail: the _focus_ on delivery is complete nonsense.

The delivery is really not the important part, what is important is the _lifetime_ of the timer. As Ingo said we try to delay as much work as possible into the future, so that all the work needed for short-lived timer is basically:

	list_add() + list_del()

This is a constant operation and whether at the end is a callback is unimportant from the perspective of the timer system.
When the timer spends more time in the timer wheel, it has to be moved into different slots over time, but this not a really expensive operation either, so e.g. all the work needed with a single cascading step is:

	list_add() + list_del() + list_add() + list_del()

This is still quite cheap and with a single cascading step we cover 2^14 jiffies (2^10 for small configurations), which is quite a lot of time and whether in that time the timer is delivered or not doesn't change above cost. Another important thing to realize is that this cost is independent of the amount of timers, the per timer cost depends only on the timeout value.

So let's look at the new timer which uses a rbtree. Its per timer cost doesn't depend on the expiry value, but on the size of the tree instead. All you have to do with the timer is:

tree_insert() + tree_remove()

This is not a constant operation, with O(log(n)) it grows quite slowly, but in any case it's more expensive than a simple list_add/list_del, this means you have to do a number of list operations before it becomes more expensive than a single tree operation. The nonconstant cost also means the more timer start using the rbtree, the relatively cheaper it becomes to use the timer wheel again.
The break-even point may now be different on various machines, but I think it's safe to assume that two list add/del is at least as cheap and usually cheaper then a tree add/del. This means timers which run for less than 2^14 jiffies are better off using the timer wheel, unless they require the higher resolution of the new timer system.

Moving timers away from the timer wheel will also not help with the problem cases of the timer wheel. If you have a million network timer, a cascading step for thousands of timer takes time, but it doesn't change the cost per timer, we just have to do the work that we were too lazy to do before. In this case it would be better to look into solutions which avoid generating millions of timer in first place.

So can we please stop this likely/unlikely expiry nonsense? It's great if you want to tell aunt Tillie about kernel hacking, but it's terrible advice to kernel programmers. When it comes to choosing a timer implementation, the delivery is completely and utterly unimportant.

bye, Roman

#166 lore raw

Re: [patch 00/43] ktimer reworked

Quoted 11 lines · Roman Zippel

Hi,

Quoted 6 lines · David Lang

In addition, once you remove the bulk of these uses from the picture (by makeing them use a new timer type that's optimized for their useage pattern, the 'unlikly to expire' case) the remainder of the timer users easily fall into the catagory where the timer is expected to expire, so that code can accept a performance hit for removing events prior to them going off that would not be acceptable in a general case version.

Quoted 3 lines

[snip timer wheel is efficient for lots of add remove, timer tree is not]

This means timers which run for less than 2^14 jiffies are better off using the timer wheel, unless they require the higher resolution of the new timer system.

PRECISELY!!! The point is to provide a new and more flexible API, either as two different sets of timer manipulation functions (one for timer wheel and one for timer tree) or as a single set with multiple backends), and migrate old timers to the new system, reclassifying them based on the timer needs. Some timers/timeouts/whatevers don't care much about delivery accuracy and could be placed into a much smaller and more efficient timer wheel with only quarter-second or half-second accuracy, and maybe even coalesced to one-or-two-second boundaries without harming functionality, because they are almost certainly going to be removed before they run. This would be a _big_ help in tickless systems, where we can schedule a bunch of networking timers to all be expired simultaneously, keeping caches hot and allowing longer sleep times. Likewise, we would port some to the new API such that they just use the same old ordinary timer wheel. Other timers that want highres guarantees would use the highres part of the kernel API (either flags in a structure or a separate set of functions) and would be added to a slow but very accurate timer tree.

The fact remains that we have two reasonably useful internal timer structures; one which is optimized for lots of timers being added and removed frequently, which has poor accuracy, and the other which doesn't handle a million timers very well, and is poor at adding and removing timers but has excellent accuracy. We should come up with a set of recommendations for when to use each interface. The _best_ way to explain that to most kernel developers who don't really understand the guts of it is:
1) If you need high resolution and you add the timer and let it expire normally, use the ktimer/whatever API.
2) If you just want to time-out an operation or fail when something doesn't happen, or a timer that doesn't care about accuracy, use the ktimeout/whatever2 API.

Quoted 1 line

So can we please stop this likely/unlikely expiry nonsense? It's great if you want to tell aunt Tillie about kernel hacking, but it's terrible advice to kernel programmers. When it comes to choosing a timer implementation, the delivery is completely and utterly unimportant.

The fact is, we have a _lot_ of timers, a _lot_ of kernel hackers, and we need some easy way to tell people which of two subsystems to use. The fact that the likely/unlikely stuff is easy to tell aunt Tillie is precisely what makes it useful to tell kernel hackers with a half-million other things on their minds. Hopefully it will be easy enough to understand that when they get around to using timers for something or another, they'll pick the right API for their task.

Cheers,
Kyle Moffett

#167 lore raw

Re: [patch 00/43] ktimer reworked

In reply to Roman Zippel

Hi,

Quoted 10 lines · Roman Zippel
Quoted 6 lines · David Lang

In addition, once you remove the bulk of these uses from the picture (by makeing them use a new timer type that's optimized for their useage pattern, the 'unlikly to expire' case) the remainder of the timer users easily fall into the catagory where the timer is expected to expire, so that code can accept a performance hit for removing events prior to them going off that would not be acceptable in a general case version.

Guys, before you continue spreading nonsense, please read carefully Ingos description of the timer wheel at http://lwn.net/Articles/156329/ . Let me also refine the statement I made in this mail: the _focus_ on delivery is complete nonsense.

Must you start every email with inflammatory rhetoric? If you want to know why you find it difficult to get people to see things your way, the key is in the above paragraph. In everyday life you don't insult a person on the street and then ask them for directions.

Yes, the expiry/non-expiry distinction is an approximation and perhaps an oversimplification. However, after insulting others for that, you continue with your own oversimplification of the algorithms involved. Following your words, I could say "Roman, before you continue spreading nonsense, please go back and read your algorithms textbook". The reality though is that both of you are approximately correct, and neither post deserves to be called nonsense.

Quoted 5 lines

The delivery is really not the important part, what is important is the _lifetime_ of the timer. As Ingo said we try to delay as much work as possible into the future, so that all the work needed for short-lived timer is basically:

	list_add() + list_del()

This is a constant operation and whether at the end is a callback is unimportant from the perspective of the timer system.

Timeout-style timers imply a short lifetime, independent of their maximum expiry time. Regular timers expected to expire can have their lifetime predicted accurately by looking at their expiry time. An interface which gives a hint as to the type of timer allows us to predict the lifetime. Please tell me how this tight relation is nonsense?

You are right in that the lifetime is what is important, but the whole point of the ktimer distinction is that by knowing if something is a timer vs a timeout, *we can more accurately predict the lifetime*.

Quoted 5 lines

When the timer spends more time in the timer wheel, it has to be moved into different slots over time, but this not a really expensive operation either, so e.g. all the work needed with a single cascading step is:

	list_add() + list_del() + list_add() + list_del()

This is still quite cheap and with a single cascading step we cover 2^14 jiffies (2^10 for small configurations), which is quite a lot of time and whether in that time the timer is delivered or not doesn't change above cost. Another important thing to realize is that this cost is independent of the amount of timers, the per timer cost depends only on the timeout value.

On the other hand, there is a huge difference between *amortized* constant time, and constant time. The cascade falls into the former category, and affects latency a great deal. It's cheap *per timer*, but by batching so much work to be done at once, it's not cheap to execute the *cascade operation*. If you are putting important, latency sensitive timers in the same data structure as non-latency-sensitive timeouts, it is going to hurt accuracy and timeliness. For timeouts we don't care much, since they rarely cascade; Timers which expire *will* go through all the cascades based on their expiry time, and if there are many of them, worst-case latency will suffer. In a mathematical sense then, it's not O(1) and to call it so is incorrect. It's "amortized O(log(l))", where "l" is the lifetime of the timer, and the minimum resolution is constant.

Quoted 5 lines

So let's look at the new timer which uses a rbtree. Its per timer cost doesn't depend on the expiry value, but on the size of the tree instead. All you have to do with the timer is:

tree_insert() + tree_remove()

This is not a constant operation, with O(log(n)) it grows quite slowly, but in any case it's more expensive than a simple list_add/list_del, this means you have to do a number of list operations before it becomes more expensive than a single tree operation. The nonconstant cost also means the more timer start using the rbtree, the relatively cheaper it becomes to use the timer wheel again.

Thank you for a very good argument about why timeouts shouldn't use rbtree, and should continue to use the timer wheel. Nobody disagrees on this however, and adding ktimers will not force any existing users to change to the new interface.

Quoted 1 line

The break-even point may now be different on various machines, but I think it's safe to assume that two list add/del is at least as cheap and usually cheaper then a tree add/del. This means timers which run for less than 2^14 jiffies are better off using the timer wheel, unless they require the higher resolution of the new timer system.

Again, putting timeouts on the timer wheel is ideal, since we know they tend to have short lifetimes. Same goes for low-resolution timers which only need jiffy accuracy. However, jiffy accuracy doesn't cut it for a lot of applications. It is when we add high accuracy that the timer wheel falls down, and requires a different approach. So let's call "dt" the desired resolution of the timer in seconds. Then the timer wheel becomes "amortized O(log(l/dt)) = O(log(l) + log(1/dt))". When you start talking about resolutions where dt=25usec, then the timer wheel all the sudden becomes worse than a balanced tree, which is always O(n), independent of resolution.

And that's the whole *point* about how we got here. Let the low resolution, low lifetime timeouts stay on the timer wheel, and make a new approach that specializes in handling longer lifetime, higher resolution timers. That's ktimers in a nutshell. You seem to be arguing for it rather than against it.

Quoted 1 line

Moving timers away from the timer wheel will also not help with the problem cases of the timer wheel. If you have a million network timer, a cascading step for thousands of timer takes time, but it doesn't change the cost per timer, we just have to do the work that we were too lazy to do before. In this case it would be better to look into solutions which avoid generating millions of timer in first place.

Putting timers on an rbtree most definitely helps with the worst-case latency of the timer wheel. That is an issue that some of us care very deeply about.

You've brought up the fact that networking shouldn't use lots of timers several times in the overall discussion. If you know how to do this, I'm sure you can start sending patches to netdev and show them all how stupid they've been all along. However, more likely you'll just find out that just maybe the networking people really *have* thought about the problem, and the solution they came up with is actually a pretty good one.

At any rate, while you fix up all those "timer-abusing" subsystems throughout the kernel, can we just try to improve the timer system in the meantime?

Quoted 1 line

So can we please stop this likely/unlikely expiry nonsense? It's great if you want to tell aunt Tillie about kernel hacking, but it's terrible advice to kernel programmers. When it comes to choosing a timer implementation, the delivery is completely and utterly unimportant.

Expected expiry is a simple predictor of expected lifetime. If we knew the lifetime, we could use that, but expiry is one hint that is easier for the developer to provide. Really, we want to know "E[l]/dt" (E[] is notation for expected value), but that's unrealistic to estimate. What ktimers says is: if it's a timeout (E[l] is low and dt is high), use the timer wheel, and if its a timer (E[l] is high and dt is low), use an rbtree. In what way is that not a reasonable approach?

Jim Bruce

#168 lore raw

Re: [patch 00/43] ktimer reworked

Hi,

Quoted 9 lines · James Bruce
Quoted 4 lines

Guys, before you continue spreading nonsense, please read carefully Ingos description of the timer wheel at http://lwn.net/Articles/156329/ . Let me also refine the statement I made in this mail: the _focus_ on delivery is complete nonsense.

Must you start every email with inflammatory rhetoric? If you want to know why you find it difficult to get people to see things your way, the key is in the above paragraph. In everyday life you don't insult a person on the street and then ask them for directions.

You analogy is wrong: Thomas and Ingo spread flyer for "free food", above is my frustration about all the people wanting free food.

Quoted 4 lines

And that's the whole *point* about how we got here. Let the low resolution, low lifetime timeouts stay on the timer wheel, and make a new approach that specializes in handling longer lifetime, higher resolution timers. That's ktimers in a nutshell. You seem to be arguing for it rather than against it.

I do, just without the focus on the lifetime, which is really unimportant for most kernel developers.

Quoted 9 lines

You've brought up the fact that networking shouldn't use lots of timers several times in the overall discussion. If you know how to do this, I'm sure you can start sending patches to netdev and show them all how stupid they've been all along. However, more likely you'll just find out that just maybe the networking people really *have* thought about the problem, and the solution they came up with is actually a pretty good one.

At any rate, while you fix up all those "timer-abusing" subsystems throughout the kernel, can we just try to improve the timer system in the meantime?

James, after giving me a rhetoric lesson you maybe should be a bit more careful with your own rhetoric. What kind of answer do you expect after insulting me?

The short version is that I didn't bring up the network timer problem, I only made a suggestions how it could be solved, but nobody followed me up on it, so I guess the problem wasn't really that big. Please check the archives for details.

bye, Roman

#169 lore raw

Re: [patch 00/43] ktimer reworked

Quoted 6 lines · Roman Zippel

Hi,

Quoted 1 line · James Bruce

And that's the whole *point* about how we got here. Let the low resolution, low lifetime timeouts stay on the timer wheel, and make a new approach that specializes in handling longer lifetime, higher resolution timers. That's ktimers in a nutshell. You seem to be arguing for it rather than against it.

I do, just without the focus on the lifetime, which is really unimportant for most kernel developers.

It _is_ important. Not because kernel developers do care about it, but because it's important for reasons of its own and therefore they should. Networking timeouts and highres audio timers are two _VERY_ different applications of "do this thing then", and kernel developers should be made aware of them. If you disagree, please explain in detail exactly why you think the lifetime is unimportant. I have yet to see an email regarding this, and I've searched the archives pretty carefully, in addition to watching this thread.

Cheers,
Kyle Moffett

--
I lost interest in "blade servers" when I found they didn't throw knives at people who weren't supposed to be in your machine room.
-- Anthony de Boer

#170 lore raw

Re: [patch 00/43] ktimer reworked

Hi,

Quoted 10 lines · Kyle Moffett
Quoted 2 lines

I do, just without the focus on the lifetime, which is really unimportant for most kernel developers.

It _is_ important. Not because kernel developers do care about it, but because it's important for reasons of its own and therefore they should. Networking timeouts and highres audio timers are two _VERY_ different applications of "do this thing then", and kernel developers should be made aware of them. If you disagree, please explain in detail exactly why you think the lifetime is unimportant. I have yet to see an email regarding this, and I've searched the archives pretty carefully, in addition to watching this

Please be precise, the "for most kernel developers" part is important. In most situations this guideline is more than enough:
- if you need fast and simple timer, use normal timer
- if you need higher resolution, use hrtimer

Only if you want to push the timer system to its limits, you have to take the corner cases into account. I consider lifetime issues an advanced topic of timer programming, which Joe Kernelhacker doesn't has to be overly concerned about (it worked quite well so far).

bye, Roman

#171 lore raw

Re: [patch 00/43] ktimer reworked

In reply to Roman Zippel
Quoted 9 lines · Roman Zippel

Hi,

Quoted 5 lines · James Bruce
Quoted 4 lines

Guys, before you continue spreading nonsense, please read carefully Ingos description of the timer wheel at http://lwn.net/Articles/156329/ . Let me also refine the statement I made in this mail: the _focus_ on delivery is complete nonsense.

Quoted 7 lines
Quoted 4 lines

Must you start every email with inflammatory rhetoric? If you want to know why you find it difficult to get people to see things your way, the key is in the above paragraph. In everyday life you don't insult a person on the street and then ask them for directions.

You analogy is wrong: Thomas and Ingo spread flyer for "free food", above is my frustration about all the people wanting free food.

And to think that this all seemed to have started with one simple email:

http://lkml.org/lkml/2005/9/15/128

;-)

-- Steve

#172 lore raw

Re: [patch 00/43] ktimer reworked

In reply to Roman Zippel
Quoted 1 line · Roman Zippel

You analogy is wrong: Thomas and Ingo spread flyer for "free food", above is my frustration about all the people wanting free food.

New features or functionality have to be motivated by looking at the benefits vs cost. I thought Thomas laid out a pretty good argument in his first email, and I don't believe either he or Ingo are claiming their approach is completely without cost. Those of us who are "wanting free food" mostly just want a clean and acceptable hrtimer implementation.

Hrtimers is a feature that has been a very long time in coming; I first needed to make an application that ran at a fixed 30Hz in 1999, which was only possible with high variance per frame due to the 10 msec sleep resolution. That mostly went away with HZ=1000 in 2.6, but is now back again since a given linux kernel can choose HZ={100,250} (across arches, one could never assume HZ=1000 anyway). I find it unfortunate that in 2005, it is still more accurate to sleep on Linux using serial port writes and flushes than with nanosleep. Yes, there is rtc on some machines, but many distributions don't allow users to access it by default (I'm guessing they have a reason for that). So, the benefit is clear for anyone doing media programming or emulating media devices. That leaves the technical side, which is making sure the implementation is right.

The discussion on ktimers unfortunately strayed from the technical very early on, and I think that has left people in bad moods all the way until now. To the extent that the discussion was technical however, I think it has been worthwhile. The implementation continues to improve.

Quoted 7 lines
Quoted 7 lines

You've brought up the fact that networking shouldn't use lots of timers several times in the overall discussion. If you know how to do this, I'm sure you can start sending patches to netdev and show them all how stupid they've been all along. However, more likely you'll just find out that just maybe the networking people really *have* thought about the problem, and the solution they came up with is actually a pretty good one.

Quoted 5 lines
Quoted 2 lines

At any rate, while you fix up all those "timer-abusing" subsystems throughout the kernel, can we just try to improve the timer system in the meantime?

James, after giving me a rhetoric lesson you maybe should be a bit more careful with your own rhetoric. What kind of answer do you expect after insulting me?

It's not an insult if you truly believe you are right, and 30 years of unix network stack designs are wrong. Please consider that your comments might be insulting the people who worked for years to get the Linux network stack to the point where it was able to saturate GbE cards. I'd imagine there isn't too much low-hanging fruit left, and to assume they are being wasteful with resources comes across as a little arrogant. But again, if they are wrong, by all means demonstrate it with concrete examples and patches, and we will all benefit in the end.

Quoted 1 line

The short version is that I didn't bring up the network timer problem, I only made a suggestions how it could be solved, but nobody followed me up on it, so I guess the problem wasn't really that big. Please check the archives for details.

I was reading then. Your solution, IIRC, was to use a coarse periodic timer to handle multiple network timeouts together. I'd expect we'd end up keeping track of the separate events somehow, probably on a list. In that case I don't see the advantage compared to using the timer wheel, which is also just list manipulation in the common case, as you have already pointed out. The coarse periodic timer would get the benefit of better batching though; Right now the timer wheel already batches, but based on jiffy resolution. Realistically though, the networking people have RFCs to follow, hardware timing, and many other constraints to worry about, so we are just hand-waving without knowing more.

One of the things that ktimers enables is moving timers with sub-10ms resolution requirements off of the wheel, which would allow us to make the timer wheel coarser, saving either memory or processing time. This would get the benefits of a specialized coarse network timer such as the approach you proposed, but without requiring the networking code to reimplement the timer wheel. The coarse timer wheel for the low-resolution timers may even make up for the extra processing overhead of putting hrtimers on an rbtree; On a typical system I would expect coarse timers (timeouts) to far outnumber hrtimers. Time will tell I guess.

So, let's try to keep focused on the real technical impediments, and we'll achieve the best end result.

- Jim Bruce

#173 lore raw

AIO Support for kernel 2.6.11 ??????

hi All

1) I like to ask why patch support is not provided for 2.6.11 kernel....

2) What needs to be done in order to use 2.6.11 kernel with full AIO Support

3) Is it possible to apply 2.6.13-rc6-B0-all.diff patch provided by ben to2.6.11 kernel after some modification,and if that is done whether i be able to get full kernel AIO Support

4) if i applied suparna's patches with linux-2.6.12-PAIO-0.6.tar on linux-2.6.12-rc6 kernel,I am getting Some errors with respect to suparna's patches.Thay are not getting applied cleanly... So i am trying to manually applied them ...but will i be able to Full AIO Support after
applying those patches on linux-2.6.12-rc6 .

vikas

__________________________________________________________
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

#174 lore raw

RE: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 10 lines · Luben Tuikov
Quoted 4 lines · Eric Dean

Luben: He is adding support for linkerrors and link/phy reset; these for for CSMI/SDI API.

Can you in your driver retreive link errors for the links

on the expanders?

Yes. (offloaded to user space)

I had a very good discussion with Luben over the
phone last night.

Luben clarified this for me in regards to expanders:

http://www.t10.org/drafts.htm#sas2
The linkerrors can be done by issuing a SMP passthru sending SMP_REPORT_ERROR_LOG. Section 10.4.3.6

The link/phy reset can be done by issuing a SMP passthru sending SMP_PHY_CONTROL. Section 10.4.3.10

The mpt fusion f/w supports smp passthru, and we could for these attributes do SMP passthru if we wanted to return this data for expanders. Our f/w only provides a easy special wrapper config page for hba phys. For expanders, we are going to have to do smp passthru.

So Christoph what should we do in driver? Ignore returning data for expanders?

Luben suggestion(correct me if I'm wrong) is this should be done thru user space, instead of exporting this in the /sys/class/sas_phy attributes. Thus we need to export a SMP_PASSTHRU mechanism. I believe there is discussion by Christoph ( and I believe Luben backs this idea) of doing all this thru the /dev/sg interface.

Quoted 5 lines
Quoted 2 lines

What and where can I get this?

http://linux.adaptec.com/sas/
Also see my sig.

Thanks. I will check it out.

Eric Moore

#175 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 9 lines · Eric Dean

I had a very good discussion with Luben over the phone last night.

Luben clarified this for me in regards to expanders:

http://www.t10.org/drafts.htm#sas2
The linkerrors can be done by issuing a SMP passthru sending SMP_REPORT_ERROR_LOG. Section 10.4.3.6

Example of it being used is shown in this user space program drivers/scsi/sas/expanders_conf.c:343:
static int report_phy_error_log(char *smp_portal_name, int phy_id)

Quoted 2 lines

The link/phy reset can be done by issuing a SMP passthru sending SMP_PHY_CONTROL. Section 10.4.3.10

Example of it being use is shown in drivers/scsi/sas/sas_expander.c:484:
static int smp_phy_control(struct domain_device *dev, int phy_id,
enum phy_func phy_func)

Quoted 6 lines

The mpt fusion f/w supports smp passthru, and we could for these attributes do SMP passthru if we wanted to return this data for expanders.

Our f/w only provides a easy special
wrapper config page for hba phys.

And this is correct in in line with SDI/SAS.

This method can be used by drivers/scsi/sdi.c.
And it fits both yours and our simplementation.

Dispatching to your implementation would go to FW, whose interface you'll have to implement. Remember you have 2 tasks: drivers/scsi/sdi.c and the FW dependent way of dispatching this to the FW for LSI.

As to ours, it would go to

	/* Phy management */
	int (*lldd_control_phy)(struct sas_phy *, enum phy_func);

function stub in the of the sas_ha_struct structure as I showed yesterday in this thread.

Quoted 2 lines

For expanders, we
are going to have to do smp passthru.

Makes sense.

Quoted 9 lines

So Christoph what should we do in driver? Ignore returning data for expanders?

Luben suggestion(correct me if I'm wrong) is this should be done thru user space, instead of exporting this in the /sys/class/sas_phy attributes. Thus we need to export a SMP_PASSTHRU mechanism. I believe there is discussion by Christoph ( and I believe Luben backs this idea) of doing all this thru the /dev/sg interface.

sg would be a good choice if the ioctl headers can be "translated" easily into sg headers -- this would make the whole task so much easier and straightforward.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#176 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Moore, Eric Dean
Quoted 2 lines · Eric Dean

So Christoph what should we do in driver? Ignore returning data for expanders?

As you mentioned doing link reset and reporting stats on expanders is done using SMP, and thus totally independent of the driver used. It should be either implemented in the transport class or in userland. Doing it in the transport class has the advantage of a unified interface for hba phys and expander phys, doing it in userland has the advantage of less kernel bloat.

Quoted 6 lines

Luben suggestion(correct me if I'm wrong) is this should be done thru user space, instead of exporting this in the /sys/class/sas_phy attributes. Thus we need to export a SMP_PASSTHRU mechanism. I believe there is discussion by Christoph ( and I believe Luben backs this idea) of doing all this thru the /dev/sg interface.

I've done a prototype using an SG_IO interface, but I'm not totally happy about. I've also seen lubens interface and I'm not totally happy about it either. Getting the interface right for SMP passthru is very hard.

#177 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 3 lines · Christoph Hellwig

As you mentioned doing link reset and reporting stats on expanders is done using SMP, and thus totally independent of the driver used.

Not quite. "Dispatching to" would be driver dependent. If you implement sdi_register_provider(struct ...); then you can make everyone happy in the _shortest_ amount of time.

I'd suggest a reading of the SDI, SAS and SAM specs for an insight of how it all ties together.

Quoted 4 lines

It should be either implemented in the transport class or in userland. Doing it in the transport class has the advantage of a unified interface for hba phys and expander phys, doing it in userland has the advantage of less kernel bloat.

You already know the answer to that.

"customers" and "customer satisfaction" is a foreign concept with the community, being the nature of Linux as it is, but what you should want to is:
- make less applications (which you may not know of) break,
- make less assumptions already taken break.

Those applications are already using SDI and only the interface would change ("/dev/sg") if you were to implement drivers/scsi/sdi.c.

Quoted 2 lines

I've done a prototype using an SG_IO interface, but I'm not totally happy about.

Care to say why?

Quoted 2 lines

I've also seen lubens interface and I'm not totally happy about it either.

Care to say why?

Quoted 1 line

Getting the interface right for SMP passthru is very hard.

1) You have the SDI spec which _tells you_ how to do it.
2) There are (HP) applications which already use that (1).

You have to stay focused on _what is required_.

Why are you trying to reinvent "SMP passthrough"?
Why not just make the customers happy?

If you implement drivers/scsi/sdi.c, as:

int sdi_register_provider(struct sdi_provider_struct *sdi_prov); void sdi_unregister_provider(struct sdi_provider_struct *sdi_prov);

everyone will be _more than happy_ to plug right into it. And those are the only 2 functions you need to EXPORT_SYMBOL_GPL.

Everything else (SDI_ functions) would be in the struct as stubs and the provider would set them if they implement them.

LSI/HP can plug right into it with *minimum of overhead*, testing etc, both from their application side and from kernel side. And this is important to both customers and companies.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#178 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 11 lines · Luben Tuikov
Quoted 3 lines · Christoph Hellwig

As you mentioned doing link reset and reporting stats on expanders is done using SMP, and thus totally independent of the driver used.

Not quite. "Dispatching to" would be driver dependent. If you implement sdi_register_provider(struct ...); then you can make everyone happy in the _shortest_ amount of time.

I'd suggest a reading of the SDI, SAS and SAM specs for an insight of how it all ties together.

Thanks Luben. You might not be able to imagine it, but there are people other than you who are able to read specs, and despite having read them they can actually talk like a normal human without referencing them in every second sentence. That beeing said SDI is not a final specification. It's a draft that's probablt not going to make it as a t10 standard because the main pushers have backed of a bit again.

We are not going to implement SDI in the kernel. Long before SDI or it's predecessor, HP CSMI were designed we made it clear we're not going to accept wide ioctl-APIs, especially when they're even bad for old ioctl API standards. The CSMI spec has been passed around in an early phase and been totally rejected, I think even publically on linux-scsi. HP decided to move ahead despite that and did a huge mis-services to their customers. It's not my problem if big companies can't listen and do things their customers have to pay for, and it's certainly not our job to work around their idiocy.

#179 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 6 lines

We are not going to implement SDI in the kernel. Long before SDI or it's predecessor, HP CSMI were designed we made it clear we're not going to accept wide ioctl-APIs, especially when they're even bad for old ioctl API standards. The CSMI spec has been passed around in an early phase and been totally rejected,

Just to say AYE on this:

the problem with these things is that they define an IOCTL interface, while a library level interface would have been a LOT better. By far. That way the spec doesn't define the implementation, but only a real INTERFACE while allowing flexibility and compatibility. IOCTLs are just very very much the wrong layer to put such an interface. (just as posix/sus specify the (g)libc interface and not the kernel interface, although of course they impact it somewhat and glibc can for several things do a straight pass-through to the raw kernel interface).

#180 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 9 lines · Arjan van de Ven
Quoted 5 lines

We are not going to implement SDI in the kernel. Long before SDI or it's predecessor, HP CSMI were designed we made it clear we're not going to accept wide ioctl-APIs, especially when they're even bad for old ioctl API standards. The CSMI spec has been passed around in an early phase and been totally rejected,

Just to say AYE on this:

Quoted 8 lines

the problem with these things is that they define an IOCTL interface, while a library level interface would have been a LOT better. By far. That way the spec doesn't define the implementation, but only a real INTERFACE while allowing flexibility and compatibility. IOCTLs are just very very much the wrong layer to put such an interface. (just as posix/sus specify the (g)libc interface and not the kernel interface, although of course they impact it somewhat and glibc can for several things do a straight pass-through to the raw kernel interface).

Hi Arjan, how are you?

As I mentioned already, you do not have to take section 4 of SDI literally. If you implement section 5 of SDI, the back end, then the front end is ajustable: sg/sysfs/whathaveyou1/whathaveyou2, etc.

Here is an excerpt sent by me to another storage engineer:
--cut--
Example of include/scsi/sdi/sdi.h (back-end):

/* This struct describes section 5 of the SDI spec */

struct sdi_functions_struct {
	int (*sdi_get_driver_info)(struct sdi_header *header,
				   struct sdi_driver_info *info);
	int (*sdi_get_controller_config)(struct sdi_header *header,
					 struct sdi_controller_config *config);
	/* the rest of the stub SDI functions defined here */
	...
};

/* This struct describes the provider */

struct sdi_provider_struct {
	char *provider_name; /* some name, whatever, may not be necessary */
	...
	struct sdi_functions_struct sdi_functions;   /* see above */
	...
};

And then the _calling_ of those functions is either via sg or sysfs or whatever makes people happy (done in drivers/scsi/sdi.c).

Dispatching of those is driver/fw/hw/whatever dependent depending on the provider and what they registered.

This will live in drivers/scsi/sdi.c and include/scsi/sdi/sdi.h --cut--

You see? You don't need IOCTLs, yet you can be fully compliant to the spec so that already existing user space management programs can transition with minimal change to their code (over to the front
end: sg/whatever). This cuts down production costs in testing, verification/etc. Makes things cheaper to deploy and customers are happy.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#181 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 4 lines · Luben Tuikov

You see? You don't need IOCTLs, yet you can be fully compliant to the spec so that already existing user space management programs can transition with minimal change to their code (over to the front
end: sg/whatever).

this is EXACTLY my point. A proper API would NOT need the userland apps to change if the underlying mechanism changes. Or in other words: today it may be SG, tomorrow BSG or SysFS, and when we open 2.7 the mechanism may be WokkieWokkie. The implementation of the interface library may need to change for this, but the management app should not.

There is a parallel in the glibc/posix/sus world: With the 2.6 kernel there is a new syscall mechanism (sysenter) on x86 kernels available. NONE of the applications needed changing, fopen() remained fopen(), not just as API but also as ABI. All that needed some adjustments were glibc internals.

#182 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Christoph Hellwig
Quoted 10 lines · Christoph Hellwig
Quoted 2 lines

I'd suggest a reading of the SDI, SAS and SAM specs for an insight of how it all ties together.

Thanks Luben. You might not be able to imagine it, but there are people other than you who are able to read specs, and despite having read them they can actually talk like a normal human without referencing them in every second sentence. That beeing said SDI is not a final specification. It's a draft that's probablt not going to make it as a t10 standard because the main pushers have backed of a bit again.

The whole point is that LSI/HP/Adaptec are _using_ SDI in one form or another and would like to have it officially in the kernel.

Quoted 1 line

We are not going to implement SDI in the kernel. Long before SDI or

Who is "we"?

Quoted 2 lines

it's predecessor, HP CSMI were designed we made it clear we're not going to accept wide ioctl-APIs, especially when they're even bad for old

You do not have to take section 4 of SDI literally, but what everyone wants is the _functionality_ of section 5 of SDI. That can be implemented as a backend, see my next message to Arjan on this thread, and the front end can be anything at all (sg/sysfs/whatever1/whatever2).

Quoted 2 lines

ioctl API standards. The CSMI spec has been passed around in an early phase and been totally rejected, I think even publically on linux-scsi.

Rejected by whom? "The community" or by you?

Let me understand this properly: LSI/HP/Adaptec are using SDI in one form or another and would like to see something like it in the kernel, but "the community", the "we" you refer to above, rejects it?

Quoted 2 lines

HP decided to move ahead despite that and did a huge mis-services to their customers.

Yes, because there is a _need_ for it.

Quoted 3 lines

It's not my problem if big companies can't listen and do things their customers have to pay for, and it's certainly not our job to work around their idiocy.

Bold statment.

Who should "big companies" listen to? You? "The community?" Are you saying "big companies" whould listen to Linux which says "no to specs" among other things?

Often enough what "big companies" agree on and use and deploy is what Linux (you?) should _listen_ to, try to understand and maybe get out of the way.

It is all about customer satisfaction, which is completely foreign to Linux, simply because of the _nature_ of Linux.

Why is there a need to _reinvent_ things? Aren't there engineers at those "big companies" who know OS design and programming?

Why do you feel the need to antiquate engineers from companies submitting drivers/patches/solutions to the Linux kernel?

Surely this isn't good for the Linux kernel in the long term. Or is it?

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#183 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 12 lines · Luben Tuikov
Quoted 10 lines · Christoph Hellwig
Quoted 2 lines

I'd suggest a reading of the SDI, SAS and SAM specs for an insight of how it all ties together.

Thanks Luben. You might not be able to imagine it, but there are people other than you who are able to read specs, and despite having read them they can actually talk like a normal human without referencing them in every second sentence. That beeing said SDI is not a final specification. It's a draft that's probablt not going to make it as a t10 standard because the main pushers have backed of a bit again.

Quoted 2 lines

The whole point is that LSI/HP/Adaptec are _using_ SDI in one form or another and would like to have it officially in the kernel.

I would hope that other users/vendors might find a use for this as well.

Quoted 8 lines
Quoted 2 lines

We are not going to implement SDI in the kernel. Long before SDI or

Who is "we"?

Quoted 2 lines

it's predecessor, HP CSMI were designed we made it clear we're not going to accept wide ioctl-APIs, especially when they're even bad for old

CSMI is a semi-proprietary spec. SDI is an attempt to turn this into an open spec. One of the reasons it has not been made into a standard is the whole IOCTL issue. Other OS's, Windows, HP-UX, Solaris allow them, Linux has recently banned them (at least in the SCSI sub-system).

Quoted 2 lines

You do not have to take section 4 of SDI literally, but what everyone wants is the _functionality_ of section 5 of SDI.

My guess is that what current app writers want is to use IOCTL's so they don't have to special-case Linux. Next best thing would be something that closely approaches it, to avoid re-writing a lot of code.

Quoted 6 lines

That can be implemented
as a backend, see my next message to Arjan on this thread, and the front end can be anything at all (sg/sysfs/whatever1/whatever2).

Quoted 2 lines

ioctl API standards. The CSMI spec has been passed around in an early phase and been totally rejected, I think even publically on linux-scsi.

The LSI driver attempted go in with CSMI. One of the reasons it was rejected was because it used IOCTL's to implement CSMI. I don't think CSMI itself was rejected (other than the fact that is required IOCTL's of course). The SDI authors are willing to use another type of interface, but have had no help in suggesting alternatives.

Quoted 2 lines

Rejected by whom? "The community" or by you?

I believe there is a common understanding that IOCTL's are bad and should be avoided. See:

http://lkml.org/lkml/2001/5/20/81

Quoted 7 lines

Let me understand this properly: LSI/HP/Adaptec are using SDI in one form or another and would like to see something like it in the kernel, but "the community", the "we" you refer to above, rejects it?

Quoted 2 lines

HP decided to move ahead despite that and did a huge mis-services to their customers.

Perhaps. Given that there seems to be no alternative, we don't have much of a choice.

Quoted 6 lines

Yes, because there is a _need_ for it.

Quoted 3 lines

It's not my problem if big companies can't listen and do things their customers have to pay for, and it's certainly not our job to work around their idiocy.

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner of it). My personal preference is to hide this stuff in a library, so the kernel implementation is hidden. But even a library needs an underlying kernel implementation.

Quoted 11 lines

Bold statment.

Who should "big companies" listen to? You? "The community?" Are you saying "big companies" whould listen to Linux which says "no to specs" among other things?

Often enough what "big companies" agree on and use and deploy is what Linux (you?) should _listen_ to, try to understand and maybe get out of the way.

Big companies often want to do things in a proprietary fashion. I personally would prefer to see a standard's-based approach.

Quoted 2 lines

It is all about customer satisfaction, which is completely foreign to Linux, simply because of the _nature_ of Linux.

More bold statements? ;-)

Quoted 13 lines

Why is there a need to _reinvent_ things? Aren't there engineers at those "big companies" who know OS design and programming?

Why do you feel the need to antiquate engineers from companies submitting drivers/patches/solutions to the Linux kernel?

Surely this isn't good for the Linux kernel in the long term. Or is it?

Luben

#184 lore raw

ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Andrew Patterson

I believe there is a common understanding that IOCTL's are bad and should be avoided. See:

http://lkml.org/lkml/2001/5/20/81

Yep. Linus's rant here reflects not only his opinion, but general consensus, I feel.

Quoted 4 lines

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner

Beyond Linus's rant, ioctls have a practical limitation, too: because they are untyped, we have to deal with stuff like the 32<->64 compat ioctl thunking.

Consider what an ioctl is, overall: a domain-specific "do this operation" interface. Which, further, is nothing but a wrapping of a "send message" + "receive response" interface. There are several ways to do this in Linux:

* block driver. a block driver is nothing but a message queue. This is why James has suggested implementing SMP as a block driver. People get stuck into thinking "block driver == block device", which is wrong. The Linux block layer is nothing but a message queueing interface.

* netlink. You connect to <an object> and send/receive messages. Not strictly limited to networking, as this is used in some areas of the kernel now for generic event delivery.

* char driver. Poor man's netlink. Unless its done right, it suffers from the same binary problems as ioctls. I don't recommend this path.

* sysfs. This has no inherent message/queue properties by itself, and is less structured than blockdrvr or netlink, so dealing with more than one outstanding operation at a time requires some coding.

sysfs's attractiveness is in its ease of use. It works with standard Unix filesystem tools. You don't need to use a library to read information, cat(1) often suffices. sysfs, since its normal ASCII (UTF8), also has none of the annoying 32<->64 compatibility issues that ioctls suffer from.

Which is best? I don't have a good answer. Largely depends on the situation, particularly queueing needs. Networking and storage are rapidly converging into "messaging", so the situation is highly fluid in any case. Coming from a networking background, I sorta lean towards the solution noone has attempted yet: netlink.

Quoted 3 lines

of it). My personal preference is to hide this stuff in a library, so the kernel implementation is hidden. But even a library needs an underlying kernel implementation.

Strongly agree here. libc shelters userspace from [most] kernel changes, by exporting syscalls in a standard manner. alsa-lib was created to shelter userspace from current and future changes in the kernel audio interface. libsdi is quite reasonable.

Jeff

#185 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 10 lines · Jeff Garzik
Quoted 4 lines · Andrew Patterson

I believe there is a common understanding that IOCTL's are bad and should be avoided. See:

http://lkml.org/lkml/2001/5/20/81

Yep. Linus's rant here reflects not only his opinion, but general consensus, I feel.

Jeff,
ioctls represent the most direct, unimpeded (by OS policy) route between the user space and a driver, potentially a few levels down a driver stack. I see it as a control issue, in one corner there are Microsoft and Linux while in the other there are the hardware vendors. OS vendors come out with ioctl replacements but can't resist enforcing policy.

As for type safety in linux, I stopped taking that seriously when practicality of having C++ code in the kernel was killed by "struct class".

Quoted 9 lines
Quoted 4 lines

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner

Beyond Linus's rant, ioctls have a practical limitation, too: because they are untyped, we have to deal with stuff like the 32<->64 compat ioctl thunking.

Do you know where there are some clear guidelines on the use of pointers in a structure passed to an ioctl to lessen (or bypass) 32<->64 compat ioctl thunking?

Quoted 21 lines

Consider what an ioctl is, overall: a domain-specific "do this operation" interface. Which, further, is nothing but a wrapping of a "send message" + "receive response" interface. There are several ways to do this in Linux:

* block driver. a block driver is nothing but a message queue. This is why James has suggested implementing SMP as a block driver. People get stuck into thinking "block driver == block device", which is wrong. The Linux block layer is nothing but a message queueing interface.

* netlink. You connect to <an object> and send/receive messages. Not strictly limited to networking, as this is used in some areas of the kernel now for generic event delivery.

* char driver. Poor man's netlink. Unless its done right, it suffers from the same binary problems as ioctls. I don't recommend this path.

* sysfs. This has no inherent message/queue properties by itself, and is less structured than blockdrvr or netlink, so dealing with more than one outstanding operation at a time requires some coding.

Quoted 5 lines

sysfs's attractiveness is in its ease of use. It works with standard Unix filesystem tools. You don't need to use a library to read information, cat(1) often suffices. sysfs, since its normal ASCII (UTF8), also has none of the annoying 32<->64 compatibility issues that ioctls suffer from.

... and on the other side for sysfs are the loss of layered error reporting, inability to supply auxiliary attributes such as a request timeout and the possibility that write()s will either be limited in size or segmented.

Quoted 5 lines

Which is best? I don't have a good answer. Largely depends on the situation, particularly queueing needs. Networking and storage are rapidly converging into "messaging", so the situation is highly fluid in any case. Coming from a networking background, I sorta lean towards the solution noone has attempted yet: netlink.

damn, we agree :-)

All in all, this is a good summary of the options available.

Quoted 9 lines
Quoted 3 lines

of it). My personal preference is to hide this stuff in a library, so the kernel implementation is hidden. But even a library needs an underlying kernel implementation.

Strongly agree here. libc shelters userspace from [most] kernel changes, by exporting syscalls in a standard manner. alsa-lib was created to shelter userspace from current and future changes in the kernel audio interface. libsdi is quite reasonable.

Doug Gilbert

#186 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 3 lines · Douglas Gilbert

ioctls represent the most direct, unimpeded (by OS policy) route between the user space and a driver, potentially a few levels down a driver stack.

With the inevitable result that most ioctl code is poorly written, and causes bugs and special case synchronization problems :) Driver writers love to stuff way too much stuff into ioctls, without thinking about overall design.

Quoted 8 lines

I see it as a control issue, in one corner there are Microsoft and Linux while in the other there are the hardware vendors. OS vendors come out with ioctl replacements but can't resist enforcing policy.

As for type safety in linux, I stopped taking that seriously when practicality of having C++ code in the kernel was killed by "struct class".

C++ was never ever meant to work with the kernel.

Quoted 11 lines
Quoted 9 lines
Quoted 4 lines

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner

Beyond Linus's rant, ioctls have a practical limitation, too: because they are untyped, we have to deal with stuff like the 32<->64 compat ioctl thunking.

Quoted 4 lines

Do you know where there are some clear guidelines on the use of pointers in a structure passed to an ioctl to lessen (or bypass) 32<->64 compat ioctl thunking?

Its impossible. If you pass pointers, you need to thunk. (Not even passing pointers via sysfs can avoid this.) Consider running a 32-bit app (with 32-bit pointers and 32-bit ABI) on a 64-bit kernel.

Quoted 28 lines
Quoted 21 lines

Consider what an ioctl is, overall: a domain-specific "do this operation" interface. Which, further, is nothing but a wrapping of a "send message" + "receive response" interface. There are several ways to do this in Linux:

* block driver. a block driver is nothing but a message queue. This is why James has suggested implementing SMP as a block driver. People get stuck into thinking "block driver == block device", which is wrong. The Linux block layer is nothing but a message queueing interface.

* netlink. You connect to <an object> and send/receive messages. Not strictly limited to networking, as this is used in some areas of the kernel now for generic event delivery.

* char driver. Poor man's netlink. Unless its done right, it suffers from the same binary problems as ioctls. I don't recommend this path.

* sysfs. This has no inherent message/queue properties by itself, and is less structured than blockdrvr or netlink, so dealing with more than one outstanding operation at a time requires some coding.

Quoted 5 lines

sysfs's attractiveness is in its ease of use. It works with standard Unix filesystem tools. You don't need to use a library to read information, cat(1) often suffices. sysfs, since its normal ASCII (UTF8), also has none of the annoying 32<->64 compatibility issues that ioctls suffer from.

Quoted 2 lines

... and on the other side for sysfs are the loss of layered error reporting,

Only for the most simple interfaces. sysfs is for exporting kernel data structures to userspace, using read(2) and write(2). You can quite literally accomplish anything with that. sysfs could export an event directory entry, and a response directory entry. The response dirent could provide all the error reporting you could ever want. That's just a 2-second off-the-cuff example.

Quoted 3 lines

inability to supply auxiliary
attributes such as a request timeout and the possibility that write()s will either be limited in size or segmented.

This entirely depends on the interface you define. These problems are all surmountable.

Note, I'm _not_ suggesting this is the best route for an SMP interface, just stating sysfs generalities. sysfs is flexible enough that it could completely replace SG_IO (though that would not be a wise idea).

Jeff

#187 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Jeff Garzik

With the inevitable result that most ioctl code is poorly written, and causes bugs and special case synchronization problems :) Driver writers love to stuff way too much stuff into ioctls, without thinking about overall design.

Could you please use adjectives, like "some" or "all" before "Device writers"? Could you also use a qualifier like, "excluding me", etc. Thanks.

Quoted 6 lines

Only for the most simple interfaces. sysfs is for exporting kernel data structures to userspace, using read(2) and write(2). You can quite literally accomplish anything with that. sysfs could export an event directory entry, and a response directory entry. The response dirent could provide all the error reporting you could ever want. That's just a 2-second off-the-cuff example.

For the 3-second "off-the-cuff example" see how the "smp_portal" sysfs binary attribute works in drivers/scsi/sas/sas_expander.c at the bottom of the file, whereby user space first writes and then reads as much data it is expecting.

(Thus there is _no_ hardcoding of the amount of data SMP request can return (as is done in SDI).)

Here are the tiny functions for refresh:

/* ---------- SMP portal ---------- */

static ssize_t smp_portal_write(struct kobject *kobj, char *buf, loff_t offs,
size_t size)

{
	struct domain_device *dev = to_dom_device(kobj);
	struct expander_device *ex = &dev->ex_dev;

	if (offs != 0)
		return -EFBIG;
	else if (size == 0)
		return 0;

	down_interruptible(&ex->smp_sema);
	if (ex->smp_req)
		kfree(ex->smp_req);
	ex->smp_req = kzalloc(size, GFP_USER);
	if (!ex->smp_req) {
		up(&ex->smp_sema);
		return -ENOMEM;
	}
	memcpy(ex->smp_req, buf, size);
	ex->smp_req_size = size;
	ex->smp_portal_pid = current->pid;
	up(&ex->smp_sema);

	return size;
}

static ssize_t smp_portal_read(struct kobject *kobj, char *buf, loff_t offs,
size_t size)

{
	struct domain_device *dev = to_dom_device(kobj);
	struct expander_device *ex = &dev->ex_dev;
	u8 *smp_resp;
	int res = -EINVAL;

	down_interruptible(&ex->smp_sema);
	if (!ex->smp_req || ex->smp_portal_pid != current->pid ||
	    offs != ex->smp_req_size)
		goto out;

	res = 0;
	if (size == 0)
		goto out;

	res = -ENOMEM;
	smp_resp = alloc_smp_resp(size);
	if (!smp_resp)
		goto out;
	res = smp_execute_task(dev, ex->smp_req, ex->smp_req_size,
			       smp_resp, size);
	if (!res) {
		memcpy(buf, smp_resp, size);
		res = size;
	}

	kfree(smp_resp);
out:
	kfree(ex->smp_req);
	ex->smp_req = NULL;
	ex->smp_req_size = 0;
	ex->smp_portal_pid = -1;
	up(&ex->smp_sema);
	return res;
}
Quoted 3 lines

Note, I'm _not_ suggesting this is the best route for an SMP interface, just stating sysfs generalities. sysfs is flexible enough that it could completely replace SG_IO (though that would not be a wise idea).

Indeed, sysfs _is_ very flexible, and with a single process open(2) it could satisfy the transaction needed functionality.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#188 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Jeff Garzik
Quoted 2 lines · Jeff Garzik

Which is best? I don't have a good answer. Largely depends on the situation, particularly queueing needs. Networking and storage are rapidly converging into "messaging", so the situation is highly fluid in any case. Coming from a networking background, I sorta lean towards the solution noone has attempted yet: netlink.

Dimitry and Alex did netlink for scsi_tranport_iscsi.c in scsi-misc. Which reminds me of some of the problems they discovered. See here
http://marc.theaimsgroup.com/?l=linux-netdev&m=111273099708516&w=2

#189 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Jeff Garzik
Quoted 6 lines · Jeff Garzik

Consider what an ioctl is, overall: a domain-specific "do this operation" interface. Which, further, is nothing but a wrapping of a "send message" + "receive response" interface. There are several ways to do this in Linux:

* block driver. a block driver is nothing but a message queue. This is

Not quite. This maybe the way it operates, but it is called "block" for a reason.

Quoted 3 lines

why James has suggested implementing SMP as a block driver. People get stuck into thinking "block driver == block device", which is wrong. The Linux block layer is nothing but a message queueing interface.

Now, just because James suggested implementing the SMP service as a block device you think this is the right thing to do?

How about this: Why not as a char device?

At least MS isn't suffering from the "no to specs" syndrome which the Linux community seems to be suffering...

SMP as a Block device????

You need to see the history of SMP and its intended use.

Quoted 3 lines

* netlink. You connect to <an object> and send/receive messages. Not strictly limited to networking, as this is used in some areas of the kernel now for generic event delivery.

This is very similar to the binary attr file "smp_portal" in drivers/scsi/sas/sas_expander.c, bottom of file.

Quoted 6 lines

* char driver. Poor man's netlink. Unless its done right, it suffers from the same binary problems as ioctls. I don't recommend this path.

* sysfs. This has no inherent message/queue properties by itself, and is less structured than blockdrvr or netlink, so dealing with more than one outstanding operation at a time requires some coding.

Exactly! SMP. (binary attr file)

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#190 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 2 lines · Luben Tuikov
Quoted 2 lines

why James has suggested implementing SMP as a block driver. People get stuck into thinking "block driver == block device", which is wrong. The

                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Quoted 6 lines
Quoted 1 line

Linux block layer is nothing but a message queueing interface.

Now, just because James suggested implementing the SMP service as a block device you think this is the right thing to do?

How about this: Why not as a char device?

you can implement a char device using the block layer. See drivers/scsi/{ch.c,osst.c,sg.c,st.c} for examples.

That beeing said I tried this approach. It looks pretty cool when you think about it, but the block layer is quite a bit too heavyweight for queueing up a few SMP requests, and we need to carry too much useless code around for it.

#191 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Christoph Hellwig
Quoted 1 line

How about this: Why not as a char device?

you can implement a char device using the block layer. See drivers/scsi/{ch.c,osst.c,sg.c,st.c} for examples.

Christoph, you failed to see that my question was _rhetorical_.

Quoted 4 lines

That beeing said I tried this approach. It looks pretty cool when you think about it, but the block layer is quite a bit too heavyweight for queueing up a few SMP requests, and we need to carry too much useless code around for it.

That's the last reason not to implement SMP as a block device. But this is good that you tried it and it "flopped". This way people will stop repeating "SMP... block device".

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#192 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 8 lines · Luben Tuikov
Quoted 4 lines

That beeing said I tried this approach. It looks pretty cool when you think about it, but the block layer is quite a bit too heavyweight for queueing up a few SMP requests, and we need to carry too much useless code around for it.

That's the last reason not to implement SMP as a block device. But this is good that you tried it and it "flopped". This way people will stop repeating "SMP... block device".

Block layer != Block device.

Nobody wants to implement SMP as a block device.

The question is whether the SMP interface should be implemented as part of the block layer.

#193 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 12 lines · Matthew Wilcox
Quoted 8 lines · Luben Tuikov
Quoted 4 lines

That beeing said I tried this approach. It looks pretty cool when you think about it, but the block layer is quite a bit too heavyweight for queueing up a few SMP requests, and we need to carry too much useless code around for it.

That's the last reason not to implement SMP as a block device. But this is good that you tried it and it "flopped". This way people will stop repeating "SMP... block device".

Quoted 6 lines

Block layer != Block device.

Nobody wants to implement SMP as a block device.

The question is whether the SMP interface should be implemented as part of the block layer.

However, the block layer is used in the context of a block device (and in some cases a char device).
If SAS domain discovery is done from the user space, and the root file system is the far side of a SAS expander, there are no suitable devices, just the SAS initiator (HBA) which currently we cannot address via the block layer.

Doug Gilbert

#194 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 6 lines · Douglas Gilbert

However, the block layer is used in the context of a block device (and in some cases a char device).
If SAS domain discovery is done from the user space, and the root file system is the far side of a SAS expander, there are no suitable devices, just the SAS initiator (HBA) which currently we cannot address via the block layer.

Invalid example. All of the methods listed -- request_queue, netlink, chrdev, sysfs, ioctl -- will work just fine when the root filesystem is on the far side of a SAS expander. These are just methods of communication, nothing more.

In your example -- userspace discovery required before root filesystem can be found -- a program running from initrd/initramfs would create an SMP device node, open it, and then proceed with the discovery and configuration process, which in turn creates the device nodes necessary to mount the root filesystem.

A request_queue is just a queue. You are in complete control of who are the producer(s) of requests, and who are consumer(s).

Jeff

#195 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 8 lines · Jeff Garzik
Quoted 6 lines · Douglas Gilbert

However, the block layer is used in the context of a block device (and in some cases a char device).
If SAS domain discovery is done from the user space, and the root file system is the far side of a SAS expander, there are no suitable devices, just the SAS initiator (HBA) which currently we cannot address via the block layer.

Quoted 5 lines

Invalid example. All of the methods listed -- request_queue, netlink, chrdev, sysfs, ioctl -- will work just fine when the root filesystem is on the far side of a SAS expander. These are just methods of communication, nothing more.

In your example -- userspace discovery required before root filesystem can be found -- a program running from initrd/initramfs would create an SMP device node, open it, and then proceed with the discovery and configuration process, which in turn creates the device nodes necessary to mount the root filesystem.

A request_queue is just a queue. You are in complete control of who are the producer(s) of requests, and who are consumer(s).

Since people are having such a tough time grasping the use of request_queue without an associated block device, here is a concrete example: drivers/block/sx8.c.

sx8 creates a queue (grep for 'oob_q') specifically for handling discovery and configuration requests. The only requests sent to this queue are I2O-ish management commands, never reads or writes. Since they are management commands, these requests are NEVER associated with a block device. Further, when sx8 discovery begins, sx8 block devices (and associated request_queues) simply don't exist.

Although sx8 management is entirely in-kernel, one could easily imagine how a userland interface (chrdev?) submits userspace commands into this queue. Further, one can see how a host adapter could register one or more queues specifically for the transit of SMP commands.

NOTE: THIS IS NOT AN ENDORSEMENT OF REQUEST QUEUES FOR SMP. I merely wish to clear up misunderstandings about the block layer found in this thread.

It remains an open question whether the _complexity_ of this approach is more than is warranted for SMP. But we've departed from that question, in this sub-thread :)

I merely illustrate that the block layer is being used _today_ for management commands.

Jeff

#196 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 1 line · --- Jeff Garzik

Since people are having such a tough time grasping the use of

Please drop the generalizaion and FUD.

You are missing the point, and the point is that using the block layer for SMP is so, so heavyweight, that no sane OS engineer would do that.

Ready to see example:
- see "smp_portal" in the complete and working SAS Transport Layer/Stack
from the 1st link of my signature. See that the overhead of sending an SMP task from user space to the domain device is _zero_, zero overhead. As soon as the user process does a read(2), the SMP task it wrote(2), is immediately sent to the domain device, using the interconnect. No bloat, no going around in circles.

SDI does exactly the same things as it binds to the controller, the PCI device implementing the domain interconnect functions (exported via SDI).

Quoted 3 lines

It remains an open question whether the _complexity_ of this approach is more than is warranted for SMP. But we've departed from that question, in this sub-thread :)

Let everyone see what is happening:
1. The industry submits a driver which clearly shows that SMP is not a block device and there is no technical merit to do it this way. The industry shows a proper implementation of SMP access to the domain.
2. Then the Linux SCSI community decides, on their own, without ANY TECHNICAL MERIT, or knowlege of the technology that they should try to implement SMP as a block device. Then they see that this isn't viable since it adds bloat and SMP doesn't warrant it, and then we're back to 1.

The parent says: here is how you do it. The child though, ignores the parent's advice and does it its own way only to find out that the parent was right all along.

My question is: at what point is this process going to stop?

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#197 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Luben Tuikov <[email protected]> :
[...]

Quoted 1 line

Let everyone see what is happening:

Is there any chance that you can put this kind of content on a different medium, say blob, rss feed, whatever instead of loading l-k ?

--
Ueimor

#198 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Jeff Garzik
Quoted 4 lines · --- Jeff Garzik

Invalid example. All of the methods listed -- request_queue, netlink, chrdev, sysfs, ioctl -- will work just fine when the root filesystem is on the far side of a SAS expander. These are just methods of communication, nothing more.

Jeff, why don't you listen from time to time to people who work with the technology on a daily basis who have experience with it, who have _insight_ of the technology? Such insight gives them great intuition when it comes to design, among other things.

Quoted 3 lines

In your example -- userspace discovery required before root filesystem can be found -- a program running from initrd/initramfs would create an SMP device node, open it, and then proceed with the discovery and

SMP is part of the protocol, of what the device (PCI) implements. It is always there, just like phys. You do not need to create it from user space. It will be there for a user process to use, via say SDI. SDI provides this as part of the controller. Read the SDI spec.

Insight of the whole architecture is irreplacable to create good design.

Quoted 2 lines

configuration process, which in turn creates the device nodes necessary to mount the root filesystem.

Also note that everyone does domain discovery in the kernel/FW and not only for SAS but for other domains (even non-SCSI). While domain discovery is in the kernel/FW, _control_ of the domain is given to user space, via say SDI -- everyone agrees on this.

Luben

#199 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Luben Tuikov
Quoted 9 lines · Luben Tuikov
Quoted 3 lines · Jeff Garzik

Consider what an ioctl is, overall: a domain-specific "do this operation" interface. Which, further, is nothing but a wrapping of a "send message" + "receive response" interface. There are several ways to do this in Linux:

* block driver. a block driver is nothing but a message queue. This is

Not quite. This maybe the way it operates, but it is called "block" for a reason.

This illustrates you fundamentally don't understand a lot of Linux, and SCSI too.

Several non-blkdev device classes (Christoph listed them) use block layer request_queue for command transit, as does SG_IO and /dev/sg.

Quoted 5 lines
Quoted 1 line

why James has suggested implementing SMP as a block driver. People get stuck into thinking "block driver == block device", which is wrong. The Linux block layer is nothing but a message queueing interface.

Now, just because James suggested implementing the SMP service as a block device you think this is the right thing to do?

I very clearly said I don't know the best answer. Perhaps you need to re-read the quoted email?

Quoted 1 line

How about this: Why not as a char device?

I covered that in the quoted email.

Quoted 2 lines

At least MS isn't suffering from the "no to specs" syndrome which the Linux community seems to be suffering...

We have plenty of specs. It's called source code.

You don't understand the Linux development process (think its more political than technical) and you don't understand even what a block driver is, and you wonder why you have difficulty getting code into the kernel?

Jeff

#200 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 5 lines · Jeff Garzik

This illustrates you fundamentally don't understand a lot of Linux, and SCSI too.

Several non-blkdev device classes (Christoph listed them) use block layer request_queue for command transit, as does SG_IO and /dev/sg.

When people start getting personal you know that they're losing it.

Quoted 6 lines

We have plenty of specs. It's called source code.

You don't understand the Linux development process (think its more political than technical) and you don't understand even what a block driver is, and you wonder why you have difficulty getting code into the kernel?

Again, when people start getting personal, you know that they are losing it.

Thank you for spreading FUD -- I'm sure you've impressed your managament, how great of a Linux programmer you are and how I don't know anything. I'd suggest you keep pushing the politics _behind_ the scences.

Have a good day,
Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#201 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 11 lines · Luben Tuikov
Quoted 3 lines · Jeff Garzik

We have plenty of specs. It's called source code.

You don't understand the Linux development process (think its more political than technical) and you don't understand even what a block driver is, and you wonder why you have difficulty getting code into the kernel?

Again, when people start getting personal, you know that they are losing it.

Thank you for spreading FUD -- I'm sure you've impressed your managament, how great of a Linux programmer you are and how I don't know anything. I'd suggest you keep pushing the politics _behind_ the scences.

I'm trying to tell it like it is, in the hopes that you will eventually learn the process, and be a good upstream maintainer we can all work with.

Jeff

#202 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 6 lines · Jeff Garzik
Quoted 3 lines

Thank you for spreading FUD -- I'm sure you've impressed your managament, how great of a Linux programmer you are and how I don't know anything. I'd suggest you keep pushing the politics _behind_ the scences.

I'm trying to tell it like it is, in the hopes that you will eventually learn the process, and be a good upstream maintainer we can all work with.

You're again spreading FUD and playing this political game hoping your management is reading this and merely because of this they'll award you. I cannot blame you -- how many of them read C code or specs... I mean, even "the community" has said "no" to specs. All you're doing is just playing your political game, spreading FUD.

And what "process" are you talking about? Do you have any idea the _amazement_ people get when learing that Linux is going to implement showing all phys on the domain in sysfs...? Do you have any idea the effort in keeping customers happy when the whims of "the community" change on an a hourly basis (as the community is learning)? Shall I give examples?

As to your reply above:
Jeff, not so according to people I work with on a daily basis from all over the world.

When you said in your email:

Quoted 2 lines · Jeff Garzik

We have plenty of specs. It's called source code.

That pretty much seals it.

Have a nice day,
Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#203 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 6 lines · Luben Tuikov
Quoted 4 lines · Jeff Garzik
Quoted 3 lines

Thank you for spreading FUD -- I'm sure you've impressed your managament, how great of a Linux programmer you are and how I don't know anything. I'd suggest you keep pushing the politics _behind_ the scences.

Quoted 8 lines
Quoted 1 line

I'm trying to tell it like it is, in the hopes that you will eventually learn the process, and be a good upstream maintainer we can all work with.

You're again spreading FUD and playing this political game hoping your management is reading this and merely because of this they'll award you. I cannot blame you -- how many of them read C code or specs... I mean, even "the community" has said "no" to specs. All you're doing is just playing your political game, spreading FUD.

My only response is from SNL: hear me now and believe me later.

I can only repeat the truth, and eventually (hope) you'll get it.

Quoted 11 lines

And what "process" are you talking about? Do you have any idea the _amazement_ people get when learing that Linux is going to implement showing all phys on the domain in sysfs...? Do you have any idea the effort in keeping customers happy when the whims of "the community" change on an a hourly basis (as the community is learning)? Shall I give examples?

As to your reply above:
Jeff, not so according to people I work with on a daily basis from all over the world.

Quoted 8 lines

When you said in your email:

Quoted 1 line · Jeff Garzik

We have plenty of specs. It's called source code.

That pretty much seals it.

Shockingly, through all this stuff that annoys you, Linux is a wild and unqualified success. ;-)

Linux is organic. Its not cleanly laid out. Its not specified in some document. Linux is result of evolution as "nature" as dictated. This drives some people nuts, but at the end of the day, it _works_.

Jeff

#204 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 1 line · Jeff Garzik

Linux is result of evolution as "nature" as dictated. This drives some people nuts, but at the end of the day, it _works_.

The last two words sound a bit general.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-=-=
http://arcgraph.de/sr/
#205 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Jeff Garzik
Quoted 3 lines · Jeff Garzik

I'm trying to tell it like it is, in the hopes that you will eventually learn the process, and be a good upstream maintainer we can all work with.

Look how you're using "all", generalizing left and right. You just want to create this FUD and spread this FUD that I don't work well with anyone. Yep, this is a pretty low blow. While in fact did you talk to everyone I work with?

I say, when people are losing it on the technical front, they try to attack personally and on political basis.

Have a nice day,
Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#206 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 11 lines · Luben Tuikov
Quoted 1 line · Jeff Garzik

I'm trying to tell it like it is, in the hopes that you will eventually learn the process, and be a good upstream maintainer we can all work with.

Look how you're using "all", generalizing left and right. You just want to create this FUD and spread this FUD that I don't work well with anyone. Yep, this is a pretty low blow. While in fact did you talk to everyone I work with?

I say, when people are losing it on the technical front, they try to attack personally and on political basis.

The technical stuff got covered long ago. Here are the basic basics:

* aic94xx needs to have the scsi-host-template in the LLDD, to fix improper layering.
* SAS generic code needs to use SAS transport class, which calls scsi_scan_target(), to avoid code duplication.
* other stuff I listed in my "analysis" email, including updating libata to support SAS+SATA hardware.

This is the stuff that I have been working on (nothing pushed to sas-2.6 yet, as it doesn't yet boot locally).

If you were willing to do this stuff, _working with others_, then I would be off in happy happy SATA land right now, and you would have been nominated to be the Linux SAS maintainer.

Call it FUD, politics, personal attacks, wanking off to please manglement, whatever. My goal has always been to (a) help Linux users by getting aic94xx+SAS upstream, and (b) try to help you understand why your code didn't go upstream verbatim, long after others have given up trying to do that.

Jeff, he of infinite patience

#207 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 8 lines · Jeff Garzik

The technical stuff got covered long ago. Here are the basic basics:

* aic94xx needs to have the scsi-host-template in the LLDD, to fix improper layering.
* SAS generic code needs to use SAS transport class, which calls scsi_scan_target(), to avoid code duplication.
* other stuff I listed in my "analysis" email, including updating libata to support SAS+SATA hardware.

All this bastardizes the code and the layering infrastructure.

If you're saying that there is "improper layering" you must be smoking something really strong.

I'd suggest you talk to storage engineers with years of storage experience about the design of the Linux SAS Stack.
I'd suggest you take a look at the USB and SBP code.
I'd suggest you take an overview of all of SAM and see how the protocols fit together.
I'd suggest you take a look at the hardware design and see how and _where_ it fits and where it does not and _why_.
I'd suggest you take a look at the event management interface (drivers/scsi/sas/sas_event.c) what it is, how it provides _all_ communication from LLDD to SAS Layer, filled in by the SAS Stack. I'd suggest you take a look at the Execute Command SCSI RPC and the TMFs, declared in the struct sas_ha_struct, filled in by the LLDD,
how they provide all communication from the SAS Stack to the LLDD (inteconnect).

I'm even ready to do a presentation in front of people explaining the design of the Linux SAS Stack, why and how it works. Specify time and venue, please.

(I will put something up on the web site -- html and figures to show the layering, function stubs, event management, etc.)

Quoted 2 lines

This is the stuff that I have been working on (nothing pushed to sas-2.6 yet, as it doesn't yet boot locally).

I'm sorry to hear that. Maybe you shouldn't have to bastardize the code. Implement SDI and then everyone will be happy. Look, I've alredy twice posted code and templates, just grab it and put your name there.

Think about it: there is no reason to mess with the code. It is present at the link below, it works and people are using it. It is also sound and spec complient. There are other subsystems which use the exact same layering (namely USB Storage and SBP) which is consistent with the SCSI Architecture Model all new protocols abide by.

Quoted 3 lines

If you were willing to do this stuff, _working with others_, then I would be off in happy happy SATA land right now, and you would have been nominated to be the Linux SAS maintainer.

You seem to be traveling a path which I've already traveled.

Jeff, if you want an Adaptec SAS driver which has the host template _in_ the driver, you can use "adp94xx" submitted earlier this year by Adaptec to "the community".

"The community" rejected it. Why? Because "common SAS tasks should be in a common layer". Well there you have the Linux SAS Stack and aic94xx at the link below (my sig), which does separate common SAS tasks and the interconnect _as per architecture and spec_. Apparently this still isn't good enough for "the community".

You see how this going around in circles just never seems to end.

One day one thing, another day the opposite, etc.

Quoted 5 lines

Call it FUD, politics, personal attacks, wanking off to please manglement, whatever. My goal has always been to (a) help Linux users by getting aic94xx+SAS upstream, and (b) try to help you understand why your code didn't go upstream verbatim, long after others have given up trying to do that.

(a) There are Linux users using "aic94xx+SAS" right now. They've downloaded a working Linux code from the link at my signature.

(b) I think it was because Linux says "no to specs" and you say that "specs are the source code".

Quoted 1 line

Jeff, he of infinite patience

Everyone is very pleased with you. You will go places.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#208 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 9 lines · Luben Tuikov
Quoted 5 lines · Jeff Garzik

The technical stuff got covered long ago. Here are the basic basics:

* aic94xx needs to have the scsi-host-template in the LLDD, to fix improper layering.
* SAS generic code needs to use SAS transport class, which calls scsi_scan_target(), to avoid code duplication.
* other stuff I listed in my "analysis" email, including updating libata to support SAS+SATA hardware.

Quoted 4 lines

All this bastardizes the code and the layering infrastructure.

If you're saying that there is "improper layering" you must be smoking something really strong.

I already described why. Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

Solution? Just use Scsi_Host_Template. Take a look at how each libata driver is implemented. The host template is in the low level driver, while most of the code is common code, implemented elsewhere.

Quoted 15 lines
Quoted 1 line

If you were willing to do this stuff, _working with others_, then I would be off in happy happy SATA land right now, and you would have been nominated to be the Linux SAS maintainer.

You seem to be traveling a path which I've already traveled.

Jeff, if you want an Adaptec SAS driver which has the host template _in_ the driver, you can use "adp94xx" submitted earlier this year by Adaptec to "the community".

"The community" rejected it. Why? Because "common SAS tasks should be in a common layer". Well there you have the Linux SAS Stack and aic94xx at the link below (my sig), which does separate common SAS tasks and the interconnect _as per architecture and spec_. Apparently this still isn't good enough for "the community".

Quoted 3 lines

You see how this going around in circles just never seems to end.

One day one thing, another day the opposite, etc.

Your current code is much closer to the desired end result, as it separates out SAS common code. That's why its being used as a base.

Jeff

#209 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Jeff Garzik

I already described why. Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

I told you -- I have this in the struct asd_ha_struct and it was merely a downplay that I didn't include the same thing in struct sas_ha_struct.

Quoted 1 line

Solution? Just use Scsi_Host_Template. Take a look at how each libata

No, this is the solution which would turn everything upside down. The easiest and smallest solution is to just include this tiny struct and end this. It would have 0 impact on code. In fact I'll implement it now and push it to the git tree. ;-)

The host template _mixes_ hw, scsi core, and protocol knowlege into one ugly blob. I've given this argument before, several times.

Quoted 2 lines

driver is implemented. The host template is in the low level driver, while most of the code is common code, implemented elsewhere.

libata isn't without architectural problems. What strikes me is that you think that libata-scsi is SATL.

You are so much better off renaming it to satl.c and given the knowlege you've gained over the years and the backing you have from engineers from companies, start with it at device level. I, as I'm sure other (not to name names) will be more than happy to contribute if you started this.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#210 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 12 lines · Luben Tuikov
Quoted 1 line · Jeff Garzik

I already described why. Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

I told you -- I have this in the struct asd_ha_struct and it was merely a downplay that I didn't include the same thing in struct sas_ha_struct.

Quoted 1 line

Solution? Just use Scsi_Host_Template. Take a look at how each libata

Quoted 7 lines

No, this is the solution which would turn everything upside down. The easiest and smallest solution is to just include this tiny struct and end this. It would have 0 impact on code. In fact I'll implement it now and push it to the git tree. ;-)

The host template _mixes_ hw, scsi core, and protocol knowlege into one ugly blob.

True.

If you do not like the current situation, evolve the SCSI core (and all drivers) to where you think they should be.

The correct answer is NOT to duplicate information between Scsi_Host_Template and Lubens_Hardware_Struct.

Quoted 5 lines
Quoted 1 line

driver is implemented. The host template is in the low level driver, while most of the code is common code, implemented elsewhere.

libata isn't without architectural problems. What strikes me is that you think that libata-scsi is SATL.

The only things that matter are (a) what the code is now, and (b) what changes are needed to get where we need to be.

Thus, regardless of whether or not libata-scsi meets the needs of SAS+SATA hardware, libata-scsi is where all SCSI<->ATA translation should occur. If you are dissatisfied, evolve the code to where it needs to be.

Quoted 1 line

You are so much better off renaming it to satl.c and given

Naming is completely irrelevant. Just modify the code.

Jeff

#211 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 7 lines · Jeff Garzik
Quoted 7 lines
Quoted 3 lines

I already described why. Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

I told you -- I have this in the struct asd_ha_struct and it was merely a downplay that I didn't include the same thing in struct sas_ha_struct.

Here is the commit in question:
http://linux.adaptec.com/sas/git/?p=linux-2.6-sas.git;a=commit;h=785747ddc631f7618d728a377346965f7db2256a

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

Solution? Just use Scsi_Host_Template. Take a look at how each libata

No, this is the solution which would turn everything upside down. The easiest and smallest solution is to just include this tiny struct and end this. It would have 0 impact on code. In fact I'll implement it now and push it to the git tree. ;-)

Quoted 8 lines
Quoted 2 lines

The host template _mixes_ hw, scsi core, and protocol knowlege into one ugly blob.

True.

If you do not like the current situation, evolve the SCSI core (and all drivers) to where you think they should be.

While the architecture in my mind is clear, I cannot do this myself (and for all drivers). Such a change would be gradual, involving more than one developer, for more than one (new) driver, etc.

First we need SDI to make everyone happy. This way HP/LSI/Adaptec can move quickest to the customers with minimal pain to the customers and to the companies which would have to change software (minimal change).

Quoted 4 lines

Thus, regardless of whether or not libata-scsi meets the needs of SAS+SATA hardware, libata-scsi is where all SCSI<->ATA translation should occur. If you are dissatisfied, evolve the code to where it needs to be.

Ok.

Quoted 1 line

Naming is completely irrelevant. Just modify the code.

Ok.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#212 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 11 lines · Luben Tuikov
Quoted 5 lines · Jeff Garzik
Quoted 5 lines
Quoted 1 line

I already described why. Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

I told you -- I have this in the struct asd_ha_struct and it was merely a downplay that I didn't include the same thing in struct sas_ha_struct.

Here is the commit in question:
http://linux.adaptec.com/sas/git/?p=linux-2.6-sas.git;a=commit;h=785747ddc631f7618d728a377346965f7db2256a

This effectively illustrates the wrong thing to do: duplicating information that's already in Scsi_Host_Template.

Just use Scsi_Host_Template in the LLDD and see where that goes.

Quoted 12 lines
Quoted 12 lines
Quoted 10 lines
Quoted 1 line

Solution? Just use Scsi_Host_Template. Take a look at how each libata

No, this is the solution which would turn everything upside down. The easiest and smallest solution is to just include this tiny struct and end this. It would have 0 impact on code. In fact I'll implement it now and push it to the git tree. ;-)

The host template _mixes_ hw, scsi core, and protocol knowlege into one ugly blob.

Quoted 8 lines
Quoted 3 lines

True.

If you do not like the current situation, evolve the SCSI core (and all drivers) to where you think they should be.

While the architecture in my mind is clear, I cannot do this myself (and for all drivers). Such a change would be gradual, involving more than one developer, for more than one (new) driver, etc.

Correct. That's why there is resistance to aic94xx's approach of creating a totally new "strict SAM" path, existing in parallel with the traditional SCSI core. You need to evolve the existing code to get there. Such changes are gradual, involving more than one developer, etc.

We don't need one small set of SCSI drivers behaving differently from the vast majority of existing SCSI drivers.

Hear me now, and believe me later: we all largely agree on the points you've raised about legacy crapola in the SCSI core. James, Christoph, myself, and several others disagree with your assertion that the old SCSI core should exist in parallel with your new SCSI core.

We differ on the path, not the goal. As a thought experiment, you could try simply implementing the changes requested, and see where that goes.

Jeff

#213 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 6 lines · Jeff Garzik
Quoted 5 lines · Luben Tuikov
Quoted 4 lines
Quoted 4 lines
Quoted 1 line

Examples are DMA boundary and s/g limit, among others. When confronted with this, you proposed an additional hardware information struct which duplicates Scsi_Host_Template.

I told you -- I have this in the struct asd_ha_struct and it was merely a downplay that I didn't include the same thing in struct sas_ha_struct.

Quoted 6 lines
Quoted 2 lines

Here is the commit in question:
http://linux.adaptec.com/sas/git/?p=linux-2.6-sas.git;a=commit;h=785747ddc631f7618d728a377346965f7db2256a

This effectively illustrates the wrong thing to do: duplicating information that's already in Scsi_Host_Template.

Just use Scsi_Host_Template in the LLDD and see where that goes.

Will cmd_per_lun, sg_tablesize, max_sectors, dma_boundary, use_clustering ever have to be adjusted specifically for a SAS hardware?

Obviuosly none of this is required _at the moment_. IOW neither the introduction of a sas_ha_hw_profile nor a pass-through of scsi_host_template down to SAS interconnect drivers is required right now. So why do one or the other now? Isn't it a sensible rule to not solve problems now which do not exist yet?

(I guess Luben only introduced sas_ha_hw_profile to demonstrate that there will never be an absolute requirement for scsi_host_template --- in its present form --- to be visible in a SAS transport layer <-> SAS interconnect driver interface. And there are certainly more alternatives to these two approaches.)

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-==-
http://arcgraph.de/sr/
#214 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 3 lines · --- Stefan Richter

Will cmd_per_lun, sg_tablesize, max_sectors, dma_boundary, use_clustering ever have to be adjusted specifically for a SAS hardware?

No hardware SAS chip I know of needs any of those legacy limitations. Neither BCM8603 nor Fusion MPT.

Those limitations are purely Parallel SCSI.

I just included it, to show proof of concept -- when the architecure and layering is correct, how easy it is to do it. But you're right, it is not needed.

Quoted 5 lines

Obviuosly none of this is required _at the moment_. IOW neither the introduction of a sas_ha_hw_profile nor a pass-through of scsi_host_template down to SAS interconnect drivers is required right now. So why do one or the other now? Isn't it a sensible rule to not solve problems now which do not exist yet?

This is exactly the rule I followed when developing the SAS Transport Layer for Linux. Furthermore, _that_ rule, to never overengineer, I learned from Linux. Sadly the politics are too deep and that rule applies only to what is convenient, at least in Linux SCSI.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#215 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Jeff Garzik
Quoted 12 lines · Jeff Garzik
Quoted 10 lines · Luben Tuikov
Quoted 6 lines
Quoted 2 lines

The host template _mixes_ hw, scsi core, and protocol knowlege into one ugly blob.

True.

If you do not like the current situation, evolve the SCSI core (and all drivers) to where you think they should be.

While the architecture in my mind is clear, I cannot do this myself (and for all drivers). Such a change would be gradual, involving more than one developer, for more than one (new) driver, etc.

Quoted 7 lines

Correct. That's why there is resistance to aic94xx's approach of creating a totally new "strict SAM" path, existing in parallel with the traditional SCSI core. You need to evolve the existing code to get there. Such changes are gradual, involving more than one developer, etc.

We don't need one small set of SCSI drivers behaving differently from the vast majority of existing SCSI drivers.

Hear me now, and believe me later: we all largely agree on the points you've raised about legacy crapola in the SCSI core. James, Christoph, myself, and several others disagree with your assertion that the old SCSI core should exist in parallel with your new SCSI core.

We differ on the path, not the goal. As a thought experiment, you could try simply implementing the changes requested, and see where that goes.

I am not familiar with most parts of the SCSI subsystem. However from what I understood, some existing concepts in the core need to be removed from SCSI core entirely, others need to be cleaned up WRT what they mean and how they represent it. It seems to me that a practical path to go would be:

A. Post mock-ups and pseudo code about how to change the core, discuss. B. Set up a scsi-cleanup tree. In this tree,
1. renovate the core (thereby break all command set drivers and all transport subsystems),
2. update ~2 command set drivers and ~2 transport subsystems
3. validate the renovated core,
4. fix the conceptual errors of the renovated core (as well as first few discovered bugs in the implementation),
5. update all other command set drivers,
6. update all transport subsystems where resources to do so are available,
7. test all command set drivers as far as hardware is accessible,
8. test the updated transport subsystems as far as hardware is accessible,
9. fix prominent bugs.
C. In mainline,
i. mark all drivers which cannot be updated in the mid term as
scheduled for temporary feature removal (i.e. they will be broken for an undetermined period),
ii. mark all drivers which have been updated in scsi-cleanup tree,
but were not thoroughly tested, as scheduled for temporary feature regression (i.e. they will be experimental for an undetermined period).
D. Push scsi-cleanup tree to -mm and shake out bugs.
E. Push to mainline.
F. Fix remaining drivers as time goes by, remove drivers which remain
broken for too long.

Most steps may overlap, some steps may repeat. Step A is fortunately already going on for quite some time.

Step 1.-4. could involve much dispute, thus taking much more time than technically necessary -or- (and that would be less fortunate) being dragged out into later stages when a conceptually stabilized core is desirable. Much of that may be prevented in step A.

I doubt that the desired cleanup of the SCSI core could be done on-the-go, i.e. without temporary breakage of larger parts of the subsystem (out of mainline). But then again, I don't know much of the subsystem, so what am I talking about here?

Also, long-term breakage of smaller parts of the SCSI subsystem in mainline is to be expected; breakage which is to be announced and scheduled.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-==-
http://arcgraph.de/sr/
#216 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Stefan Richter

A. Post mock-ups and pseudo code about how to change the core, discuss. B. Set up a scsi-cleanup tree. In this tree,
1. renovate the core (thereby break all command set drivers and all transport subsystems),

No way. Doing things from scatch is a really bad idea. See how far we came with Linux 2.6 scsi vs 2.4 scsi without throwing everything away and break the world. Please submit changes to fix _one_ thing at a time and fix all users. Repeat until done or you don't care anymore.

#217 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 10 lines · Christoph Hellwig
Quoted 4 lines · Stefan Richter

A. Post mock-ups and pseudo code about how to change the core, discuss. B. Set up a scsi-cleanup tree. In this tree,
1. renovate the core (thereby break all command set drivers and all transport subsystems),

No way. Doing things from scatch is a really bad idea. See how far we came with Linux 2.6 scsi vs 2.4 scsi without throwing everything away and break the world. Please submit changes to fix _one_ thing at a time and fix all users. Repeat until done or you don't care anymore.

It is a mistake to think that you can not do a big rework and keep SCSI
sub-system stable. You just have to make sure the OLD way is supported for as log as it is needed.

E.g. before moving in the RIGHT direction and weeding out parallel SCSI
atavism from the common SCSI layer (or should I say SAM, to please Luben) you can insert "generic" transport layer at the bottom (just like Luben inserted his SAS) and use it to keep all currently supported drivers stable. SCSI mid-layer can be reworked in any number of steps, even in one step, because is not a big thing, it is just 11k lines plus 4k of recently added transport modules.

Quoted 5 lines

-
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/

#218 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 3 lines · Sergey Panov

It is a mistake to think that you can not do a big rework and keep SCSI
sub-system stable. You just have to make sure the OLD way is supported for as log as it is needed.

No. Rewriting something from scratch is horrible engineering practice. It's impossible to very huge changes, small incremental changes OTOH allow easier planning, easier calculation of the risks and cost and most import better test coverage. There's nothing specific to scsi or linux kernel code about it. It'd suggest you read:

http://www.joelonsoftware.com/articles/fog0000000069.html

or various similar articles. Full scale rewrites almost never work out.

#219 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Sergey Panov

It is a mistake to think that you can not do a big rework and keep SCSI
sub-system stable. You just have to make sure the OLD way is supported for as log as it is needed.

No. Rewriting something from scratch is horrible engineering practice.

Most of the time. Besides "rework" is not necessarily "rewrite from scratch", most of the time it means "modification" of the existing system.

Quoted 6 lines

It's impossible to very huge changes, small incremental changes OTOH allow easier planning, easier calculation of the risks and cost and most import better test coverage. There's nothing specific to scsi or linux kernel code about it. It'd suggest you read:

http://www.joelonsoftware.com/articles/fog0000000069.html

Bad example -- just count number of lines in drivers/scsi/scsi*.c and in Netscape 4.0 and you'll see why.
That does not mean I advocate throughing out current SCSI mid layer and writing a new one. As I can tell, no one on that list is proposing the "rewrite from scratch" approach.
I just was trying to point out that Luben's transport "layers" in
place of transport "modules-appendages" simplifies that migration/evolution.

Quoted 2 lines

or various similar articles. Full scale rewrites almost never work out.

Sergey Panov

===========================================

I expressed my personal opinion and I am not speaking for anyone else.

#220 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 3 lines · Sergey Panov

I just was trying to point out that Luben's transport "layers" in
place of transport "modules-appendages" simplifies that migration/evolution.

True. "modules-appendages" just makes everything messy. There is so much SPI in the host template... Take for example recovery, or as Linux SCSI calls it Error Handling (EH).

EH in Linux SCSI is SPI. This is a fact, and anyone can look at the code to convince themselves.

In order to properly get rid ourselves of HCIL, recovery should be offloaded to the transport _layer_ which communicates with the transport/interconnect to get things going, as shown in the SAS Transport Stack at the link in my signature, USB* or SBP subsystems.

* I've been asking Alan to properly implement USB recovery in the USB Storage subsystem... Maybe one day...

That is, the layer above knows nothing of the layer below, but each layer provides well defined functionality, and they all work in tandem. This is exactly what allows for quick growth and rich future (of a design).

In such a design, SCSI Core would be very small and the task paths would be very straightforward as shown in the SAS Transport Stack in the link in my signature, USB or SBP subsystems.

BTW, "modules-appendages" very truly describes the current state of Linux SCSI and this can be seen from, for example the scsi host structure, where those "modules-appendages" are "hooked".

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#221 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Christoph Hellwig
Quoted 1 line · Christoph Hellwig

No. Rewriting something from scratch is horrible engineering practice.

There I must disagree strongly. There are times when it is the right thing to do because the original is unsalvagable (see drivers/ide).

OTOH I do not believe the scsi layer is in this state.

Luben, it isn't about layering. Linux does layering and does it strongly but it does not do unneccessary layering. If the layer above is wrong then adapt it step by step without breaking existing stuff (or making sure the existing changes to drivers are clean and testable).

That process works. There is very little left of the original "Linux" and most of what is left is the stuff that most needs maintenance (eg floppy.c, tty layer). In time they too will change.

Don't go around the scsi layer for something generic, go through it. Going around things or adding ugly hacks is fine (and justified) for a specific single piece of hardware that is somehow brain damaged, its not the right approach for something likely to be mainstream and generic.

#222 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Christoph Hellwig
Quoted 8 lines · Christoph Hellwig
Quoted 3 lines · Sergey Panov

It is a mistake to think that you can not do a big rework and keep SCSI sub-system stable. You just have to make sure the OLD way is supported for as log as it is needed.

No. Rewriting something from scratch is horrible engineering practice.

Off Topic:
Discourse on Christoph's "Rewriting something from scratch
is horrible engineering practice"

Christoph,

Imagine a for ( ) { } loop spanning 5000 lines. Imagine never using functions to separate things. But imagine that a _factory_ is using this code on its production line and that code, although badly written, does work and keeps the production line going and thousands of people working.

They hire an engineer to make it _managable_ and supportable -- this warrants understanding the production line, what the code does, what it controls and how. Understanding how the factory workers use it and what they expect. Understanding the code (which may not be as easy). Then it is rewritten so that it can be easily supported and maintained.

This is real life example.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#223 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 3 lines · Luben Tuikov

controls and how. Understanding how the factory workers use it and what they expect. Understanding the code (which may not be as easy). Then it is rewritten so that it can be easily supported and maintained.

Very very rarely, because it means down time and supporting two systems at once. Take a look at the australian customs fiasco or the british passport office disaster to see why (actually almost any large government IT project where politics dictated 'write new stuff so I can announce it in parliament').

The smart factory update would occur piece by piece. Starting with the most pressing problems (ie fastest ROI) and working to a plan that ends up with the system modular and clean.

You don't turn a steel plant off for a software upgrade.

#224 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 13 lines · Alan Cox
Quoted 3 lines · Luben Tuikov

controls and how. Understanding how the factory workers use it and what they expect. Understanding the code (which may not be as easy). Then it is rewritten so that it can be easily supported and maintained.

Very very rarely, because it means down time and supporting two systems at once. Take a look at the australian customs fiasco or the british passport office disaster to see why (actually almost any large government IT project where politics dictated 'write new stuff so I can announce it in parliament').

Quoted 5 lines

The smart factory update would occur piece by piece. Starting with the most pressing problems (ie fastest ROI) and working to a plan that ends up with the system modular and clean.

You don't turn a steel plant off for a software upgrade.

There was 0 (zero) effective downtime to the factory.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#225 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Luben Tuikov <[email protected]> disait dernièrement que :

Quoted 14 lines · Alan Cox
Quoted 13 lines · Luben Tuikov
Quoted 4 lines

controls and how. Understanding how the factory workers use it and what they expect. Understanding the code (which may not be as easy). Then it is rewritten so that it can be easily supported and maintained.

Very very rarely, because it means down time and supporting two systems at once. Take a look at the australian customs fiasco or the british passport office disaster to see why (actually almost any large government IT project where politics dictated 'write new stuff so I can announce it in parliament').

Quoted 7 lines
Quoted 5 lines

The smart factory update would occur piece by piece. Starting with the most pressing problems (ie fastest ROI) and working to a plan that ends up with the system modular and clean.

You don't turn a steel plant off for a software upgrade.

There was 0 (zero) effective downtime to the factory.

but refactoring can be done in incremental pieces, can't be ? rewriting it from scratch is, in this very case, really for the sake of self-pride and brain-masturbation.
Bravo

This is not a really convincing example...

Signature · 5 lines
Mathieu Segaud
-
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
#226 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 9 lines · Regala

but refactoring can be done in incremental pieces, can't be ? rewriting it from scratch is, in this very case, really for the sake of self-pride and brain-masturbation.
Bravo

This is not a really convincing example...

Signature · 1 line
Mathieu Segaud

They, the factory, wanted it rewritten from scratch, so that they can maintain and support it themselves.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#227 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Luben Tuikov

Luben Tuikov <[email protected]> disait dernièrement que :

Quoted 14 lines · Alan Cox
Quoted 13 lines · Luben Tuikov
Quoted 4 lines

controls and how. Understanding how the factory workers use it and what they expect. Understanding the code (which may not be as easy). Then it is rewritten so that it can be easily supported and maintained.

Very very rarely, because it means down time and supporting two systems at once. Take a look at the australian customs fiasco or the british passport office disaster to see why (actually almost any large government IT project where politics dictated 'write new stuff so I can announce it in parliament').

Quoted 7 lines
Quoted 5 lines

The smart factory update would occur piece by piece. Starting with the most pressing problems (ie fastest ROI) and working to a plan that ends up with the system modular and clean.

You don't turn a steel plant off for a software upgrade.

There was 0 (zero) effective downtime to the factory.

but refactoring can be done in incremental pieces, can't be ? rewriting it from scratch is, in this very case, really for the sake of self-pride and brain-masturbation.
Bravo

This is not a really convincing example...

Signature · 1 line
Mathieu Segaud
#228 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Christoph Hellwig
Quoted 11 lines · --- Christoph Hellwig
Quoted 4 lines · Stefan Richter

A. Post mock-ups and pseudo code about how to change the core, discuss. B. Set up a scsi-cleanup tree. In this tree,
1. renovate the core (thereby break all command set drivers and all transport subsystems),

No way. Doing things from scatch is a really bad idea. See how far we came with Linux 2.6 scsi vs 2.4 scsi without throwing everything away and break the
world. Please submit changes to fix _one_ thing at a time and fix all users. Repeat until done or you don't care anymore.

No offence Christoph, but who are you again?

There is a clear reason why you among others do not want new architecture. And that reason is (people) obsoletion.

Such political stance cannot go on forever -- just look at History. Sooner or later things change and they change radically. The question is How prepared are you/we to cope with this (inevitable) change?

Either way, obsoletion or adoption -- think about it, it doesn't only apply to computer and OS design, it applies to everything.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#229 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 8 lines · Luben Tuikov

No offence Christoph, but who are you again?

There is a clear reason why you among others do not want new architecture. And that reason is (people) obsoletion.

Such political stance cannot go on forever -- just look at History. Sooner or later things change and they change radically. The question is How prepared are you/we to cope with this (inevitable) change?

THIS HAS FUCK-ALL TO DO WITH POLITICS.

Its about working with the SCSI layer, not around it.

Jeff

#230 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Christoph Hellwig
Quoted 10 lines · Christoph Hellwig
Quoted 4 lines · Stefan Richter

A. Post mock-ups and pseudo code about how to change the core, discuss. B. Set up a scsi-cleanup tree. In this tree,
1. renovate the core (thereby break all command set drivers and all transport subsystems),

No way. Doing things from scatch is a really bad idea. See how far we came with Linux 2.6 scsi vs 2.4 scsi without throwing everything away and break the world. Please submit changes to fix _one_ thing at a time and fix all users. Repeat until done or you don't care anymore.

I agree with you. Alas my wording was misunderstandable und obviously carried a wrong tone.

I did not say "replace the core" in step 1. Also, the breakage which I refer to in step 1 would have to be immediately corrected in step 2 (although not for the whole subsystem at once, to allow for a fast cycle of validation of what happened in step 1). Furthermore I specifically said that most steps may (let me add: and should) overlap.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-==-
http://arcgraph.de/sr/
#231 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

In reply to Stefan Richter
Quoted 7 lines · Stefan Richter
Quoted 2 lines · Jeff Garzik

We differ on the path, not the goal. As a thought experiment, you could try simply implementing the changes requested, and see where that goes.

I doubt that the desired cleanup of the SCSI core could be done on-the-go, i.e. without temporary breakage of larger parts of the subsystem (out of mainline). But then again, I don't know much of the subsystem, so what am I talking about here?

Also, long-term breakage of smaller parts of the SCSI subsystem in mainline is to be expected; breakage which is to be announced and scheduled.

Stefan, what you and Luben are missing is that big-bang changes like you are proposing are simply not acceptable anymore.

a few years ago when the 2.5 kernel series opened a similar big-bang approach was attempted for the IDE drivers. the instability that resulted (and rumors of the instability being worse then it was) eliminated a lot of people from testing things. things finally got bad enough that the entire system was reverted, and then a developer (one who had previously stated that such drastic changes were impossible) sat down and produced a long series of patches, each of which did a small amount of changes, each of which left the kernel in a working state (and each of which provided an advantage that could be identified at the time of the patch, either a better abstraction or a code cleanup). over a very few months (especially relative to the time spent working on the big-bang patches) the entire system was re-written.

This is what Jeff is trying to tell you. you can't just produce an entirely new SCSI subsystem and drop it into the kernel one day, you can all agree on a goal (this has almost been done, but nto quite), but that's only the first step. After you have some idea of the goal you then have to look at how to move to that goal without breaking things in the meantime. This requires that each step along the way keeps things working and is relativly straightforward in and of itself.

this definantly sounds a LOT harder then the 'throw it out and replace it all' approach, and it is (from the point of view of the programmer), however the result ends up being far more reliable as the process forces better examination of all the details, and allows more people to understand what's happening each step of the way. And since there are no releases that are made unuseable for people deliberatly, you also get extensive testing of all the steps along the way. This not only finds bugs sooner, it also makes it far more obvious where performance issues show up

so please accept that you aren't going to be able to replace any significant system in one massive change and instead start looking for ways to move the existing design towards where you want it to be and you will receive a lot of assistance in the process instead of banging heads with everyone.

David Lang

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#232 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

Quoted 2 lines · --- David Lang

Stefan, what you and Luben are missing is that big-bang changes like you are proposing are simply not acceptable anymore.

Take a look at the link below, working SAS code with the current kernel. No one is trying to produce big-bang changes. This is what Jeff want's you to believe that I'm trying to do -- this is part of his political game and FUD and apparently he's succeeding.

I repeat: no on is trying to produce a new "big-bang changes" as you call them. See the working code in the link at my sig. This is _current_ Linus's tree with SAS Stack in it.

Don't yield to the FUD.

Quoted 2 lines

This is what Jeff is trying to tell you. you can't just produce an entirely new SCSI subsystem and drop it into the kernel one day, you can

No, this is what he wants you to believe that I'm trying to do. This is what people start doing when they loose on technological ground. Do not yield to the FUD and politics. See the working code of current Linus's tree with SAS in it in my sig link.

I repeat, no one is trying to replace anything or throw anything out. This is just FUD and politics which Jeff is spreading because he's got an agenda in convincing certain people certain things.

See the working SAS code in the link below -- current Linus' tree with SAS in it. Soon enough it would contain SDI back-end and then HP and LSI would be able to plug right in, and I think there's an engineer out there who's already implemented a front end.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#233 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

In reply to David Lang
Quoted 6 lines · David Lang
Quoted 3 lines · Stefan Richter

I doubt that the desired cleanup of the SCSI core could be done on-the-go, i.e. without temporary breakage of larger parts of the subsystem (out of mainline). But then again, I don't know much of the subsystem, so what am I talking about here?

Also, long-term breakage of smaller parts of the SCSI subsystem in mainline is to be expected; breakage which is to be announced and scheduled.

Stefan, what you and Luben are missing is that big-bang changes like you are proposing are simply not acceptable anymore.

I agree with you that big-bang changes are not acceptable. This wasn't however what I had in mind.

Quoted 1 line

a few years ago when the 2.5 kernel series opened a similar big-bang approach was attempted for the IDE drivers. the instability that resulted (and rumors of the instability being worse then it was) eliminated a lot of people from testing things. things finally got bad enough that the entire system was reverted, and then a developer (one who had previously stated that such drastic changes were impossible) sat down and produced a long series of patches, each of which did a small amount of changes, each of which left the kernel in a working state (and each of which provided an advantage that could be identified at the time of the patch, either a better abstraction or a code cleanup). over a very few months (especially relative to the time spent working on the big-bang patches) the entire system was re-written.

What I proposed was to "renovate" a _part_ of the SCSI subsystem (the core and the interfaces of the rest of the subsystem to the core) with the 2.6 kernel as a basis. This is a huge difference to 2.5. Changes took place everywhere in 2.5, many of them drastic.

I agree with you that the incremental approach is preferrable whenever possible. I even believe that this method could be applied to the SCSI core cleanup. However, concerns were voiced that this method would effectively lead to a double SCSI core: The old one, and a new one in parallel to it which doesn't share much code with the old one. (At least for some time, perhaps for a too long time.)

It has been said multiple times that this would not be desirable for reasons of /a/ more kernel bloat (while the goal was to remove existing bloat and lay foundations to avoid future bloat), and /b/ massive maintenance burden of two parallel infrastructures.

So that's why I said that *short-term* breakage right on top and right below the core should be accepted.

Again, the huge difference to the 2.5 times would be that all this would happen on top of a relatively stable kernel. (Stable in two senses.)

Quoted 1 line

This is what Jeff is trying to tell you. you can't just produce an entirely new SCSI subsystem and drop it into the kernel one day, you can

What I was referring to was to clean up a _part_ of the subsystem (the core), not to replace the subsystem. I admit though that my wording left much room for misunderstanding.

Furthermore, note that the "scsi-cleanup tree" which I referred to is not meant to be a fork. It should merely be another working stage before the -mm stage. And let me add that this stage should be left as soon as possible.

Quoted 3 lines

all agree on a goal (this has almost been done, but nto quite), but that's only the first step. After you have some idea of the goal you then have to look at how to move to that goal without breaking things in the meantime. This requires that each step along the way keeps things working and is relativly straightforward in and of itself.

this definantly sounds a LOT harder then the 'throw it out and replace it all' approach, and it is (from the point of view of the programmer), however the result ends up being far more reliable as the process forces better examination of all the details,

I agree with you on that. Again, although my post may have sounded like it, I did not want to advocate the "throw it out and replace it all" approach.

Quoted 1 line

and allows more people to understand what's happening each step of the way.

Absolutely.

However I don't agree with you that _every_ little step must keep everything working. I believe that this may actually make the transition less easy to follow.

Quoted 1 line

And since there are no releases that are made unuseable for people deliberatly, you also get

I did not suggest to make unuseable releases.

Quoted 1 line

extensive testing of all the steps along the way. This not only finds bugs sooner, it also makes it far more obvious where performance issues show up

I agree with you on these advantages of the "(try to) keep everything working after each patch". Although the monitoring of performance is less important during the initial stage of the cleanup of the core.

Quoted 1 line

so please accept that you aren't going to be able to replace any significant system in one massive change

Agreed. This is absolutely not what should be done.

Quoted 1 line

and instead start looking for ways to move the existing design towards where you want it to be and you will receive a lot of assistance in the process instead of banging heads with everyone.

OK.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-==-
http://arcgraph.de/sr/
#234 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

Quoted 8 lines · Stefan Richter

What I was referring to was to clean up a _part_ of the subsystem (the core), not to replace the subsystem. I admit though that my wording left much room for misunderstanding.

Furthermore, note that the "scsi-cleanup tree" which I referred to is not meant to be a fork. It should merely be another working stage before the -mm stage. And let me add that this stage should be left as soon as possible.

gosh, could you please shut up and code now?

There's been various TODO items posted:

(1) my TODO list for making the core HCIL idependent
(2) finishing the transition to remove struct scsi_request and only send down S/G list
(3) get rid of legacy host probing

and we'd all be happy if you added to the list. Talking doesn't change anything, please submit patches and help moving things forward. Thanks.

And please start a new thread for such suggestions, this thread has finally managed to get into my killfile.

#235 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

Quoted 1 line · Christoph Hellwig

On Sat, Oct 22, 2005 at 07:41:08PM +0200, Stefan Richter wrote:

[obviously something annoying]

Quoted 2 lines

gosh, could you please shut up and code now?

I am shutting up right now, am in the process of learning more about SCSI and Linux' implementation of it, and will submit patches as soon as I am able to. This will take much time though as I am new here and cannot devote as much time to it as I liked, as it is not my profession.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-==-
http://arcgraph.de/sr/
#236 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attachedPHYs)

In reply to Christoph Hellwig
Quoted 1 line · Christoph Hellwig

There's been various TODO items posted:

I thought "been posted" warrants at least a reference to the post. I am, for one, have not seen that TODO list.

Sergey

===================================================================
I am expressing my personal opinion and not speaking for anyone else.

#237 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Stefan Richter
Quoted 9 lines · I wrote:

1. renovate the core (thereby break all command set drivers and all transport subsystems),
2. update ~2 command set drivers and ~2 transport subsystems
3. validate the renovated core,
4. fix the conceptual errors of the renovated core (as well as first few discovered bugs in the implementation),
5. update all other command set drivers,
6. update all transport subsystems where resources to do so are available,

Step 6 probably involves the creation of a SPI transport layer. It implements former SPI related functionality of the core and may receive former code of the core. BTW, it may be a good idea to really defer this to step 6 instead of doing so in step 2.

Signature · 3 lines
Stefan Richter
-=====-=-=-= =-=- =-==-
http://arcgraph.de/sr/
#238 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Jeff Garzik
Quoted 1 line · --- Jeff Garzik

http://linux.adaptec.com/sas/git/?p=linux-2.6-sas.git;a=commit;h=785747ddc631f7618d728a377346965f7db2256a

Quoted 3 lines

This effectively illustrates the wrong thing to do: duplicating information that's already in Scsi_Host_Template.

No, it doesn't. It shows you that accomodating of this is so very easy. Easy and straightforward, just as the comming shows.

Quoted 1 line

Just use Scsi_Host_Template in the LLDD and see where that goes.

We've done this already: adp94xx submitted earlier this year, rejected by the community, because "common SAS tasks should go to a common layer". Now you _have_ that common layer, the SAS Transport Stack/Layer. But the requirements of the community seem to change on a daily basis.

It looks like "the community" got more than it bargained for, and since it doesn't understand it, it wants to bastardize the code and the layering.

Quoted 6 lines
Quoted 3 lines

While the architecture in my mind is clear, I cannot do this myself (and for all drivers). Such a change would be gradual, involving more than one developer, for more than one (new) driver, etc.

Correct. That's why there is resistance to aic94xx's approach of creating a totally new "strict SAM" path, existing in parallel with the

No, it is not correct -- you complety turn around anything I say to make yourself look right.

Here is what I meant: the resistance is because a few people of Linux SCSI want things done _their_ way, using _their_ code, reinventing code and concepts done already by engineers who use the technology every day.

Why else is there a COMPLETLY BROKEN and WRONG "SAS transport attributes"? Politics and influence, thats why. So that you can say "change already existing code". So in effect politically "correct" people can submit COMPLETY WRONG AND BROKEN CODE with their name on it, and when there is a proper code wating to go in, they can BLOCK IT and ask that current BROKEN code be changed (beyond recognition) code which made it in, NOT because of technological merit but because of political influence.

Linux SCSI people should start _listening_ to technology engineers who work with this technology every day. If they showed this open attitude, I can tell you that _a lot more_ engineers would get involved to _improve_ further Linux SCSI, who are holding out now just because of this "my way or no way" attitude of a few folks at Linux SCSI.

Furthermore, "aic94xx" is NOT CREATING ANYTHING NEW. This is how USB Storage and SBP already work. There is clearly separated transport layer, independent of the interconnect. That layer depends on the type of device connected. Using such an infrastructure you can layer more varied architectures, as opposed to dictating that aic94xx needs the host template in it, short-circuting proper layring.

I repeat again: apd94xx already has the Host Template IN IT.
I repeat again: nothing in the Hardware of AIC-94XX Host Adapter has _anything_ to do with Host Templates. Host Templates are a SCSI thing. The hardware implements an access point to the _interconnect_: Execute Command SCSI RPC and TMFs. It is completely backwards to force something at a place where it does not belong.
I repeat again: USB Storage and SBP _already_ implement such an architecture as shown by SAS.

Had we had multiple Transport Layers back when SCSI Core was written (imported from BSD?) I can tell you that there'd be such a layering disposistion as shown in USB/SBP/SAS _already_ in the kernel -- just because IT MAKES SENSE.

Quoted 2 lines

traditional SCSI core. You need to evolve the existing code to get there. Such changes are gradual, involving more than one developer, etc.

Thank you for the mockery. What I meant is that I don't mind working towards this goal, with storage engineers who _know_ and _understand_ SCSI Technology, not necessarily SAS, but SCSI in general. There is only a few folks like that here at lsml who are active and at least one whom I know of who is not active.

What actually seems to be happening at Linux SCSI is not "working together" but "If you do not do it _my_ way, I'll spin your words and say that you are not willing to ``work together''." which is _exactly_ what you do.

Is it possible for Linux SCSI to learn that they are doing something wrong? Is it possible for Linux SCSI to learn that they need to listen and learn from company engineers, as opposed to doing things _their_ way? Apparently not.

Quoted 2 lines

We don't need one small set of SCSI drivers behaving differently from the vast majority of existing SCSI drivers.

USB Storage and SBP are already like that.

Then again why are you saying this? Would you loose control? Cannot you see that such changes are necessary to go forward towards the future? Do you think that such changes would be happening only in Linux SCSI?

If Linux overall has the attitude you are showing, Linux would go extinct in just a few years. Just enough time for such antics to get to paying customers (who not necessarily have technological know-how, but it would eventually get to them).

Quoted 1 line

Hear me now, and believe me later: we all largely agree on the points

You are a very good politican -- just keep repeating this.

Quoted 3 lines

you've raised about legacy crapola in the SCSI core. James, Christoph, myself, and several others disagree with your assertion that the old SCSI core should exist in parallel with your new SCSI core.

This isn't my new SCSI Core. I don't have a new SCSI Core. But I'm flattered that you feel this way.

Quoted 2 lines

We differ on the path, not the goal. As a thought experiment, you could try simply implementing the changes requested, and see where that goes.

Been there, done that: adp94xx, rejected by none other but "the community". Here is now the Linux SAS Stack and aic94xx, working completely fine, full source code, git tree, patch file, whole working tree (Linus' as of Friday evening + SAS Stack + aic94xx) present at the link in my sig.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#239 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Luben Tuikov
Quoted 8 lines · Luben Tuikov
Quoted 3 lines · Jeff Garzik

I'm trying to tell it like it is, in the hopes that you will eventually learn the process, and be a good upstream maintainer we can all work with.

Look how you're using "all", generalizing left and right. You just want to create this FUD and spread this FUD that I don't work well with anyone. Yep, this is a pretty low blow. While in fact did you talk to everyone I work with?

Since you asked, I found you quite impossible to deal with at the OLS BOF you held, and I wasn't the only one. I was hoping you'd learn, but you seem unwilling to listen to other people's ideas.

#240 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Matthew Wilcox

Since you asked, I found you quite impossible to deal with at the OLS BOF you held, and I wasn't the only one. I was hoping you'd learn, but you seem unwilling to listen to other people's ideas.

Be specific, be technical. All I did was merely present SAS.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#241 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 7 lines · Luben Tuikov
Quoted 4 lines · Matthew Wilcox

Since you asked, I found you quite impossible to deal with at the OLS BOF you held, and I wasn't the only one. I was hoping you'd learn, but you seem unwilling to listen to other people's ideas.

Be specific, be technical. All I did was merely present SAS.

No. What was advertised was a SCSI BOF which you then took over and spent the entire time talking about the Adaptec SAS driver. You weren't interested in discussing wider SCSI issues. You weren't interested in talking about how other vendors implemented SAS. You weren't interested in discussing how we could get the best possible SAS interface in Linux. You shut down other people when they tried to discuss these things. It was a complete waste of time.

#242 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 2 lines · Matthew Wilcox

No. What was advertised was a SCSI BOF which you then took over and

It was advertised as "SAS BOF" -- the person who wrote that on the message board (reading this list currently) can verify that.

Quoted 4 lines

spent the entire time talking about the Adaptec SAS driver. You weren't interested in discussing wider SCSI issues. You weren't interested in talking about how other vendors implemented SAS. You weren't interested in discussing how we could get the best possible SAS interface in Linux.

I still am. What everyone now wants is SDI. And as you can see I've posted several times _code_ and templates as to how to do a backend which would work as per spec and a front end which would be adjustable to the whims of "the community", sg/sysfs/whatever1/whatever2.

I think SDI will completely satisfy everyone's needs, independently of the fact whether the the protocol is hidden in the FW or not.

In fact Fusion MPT is very cool: you only add a few PCI IDs and your hw works with the same driver! And if you care about protocol
specifics: use SDI.

But the community wanted involvement so then you say: "No! Give us your hardware, we'll do it for you." and then you get into this never-ending goose chase, implementing the wrong thing, the wrong way, as opposed to _listening_ to what is actually wanted.

Quoted 2 lines

You shut down other people when they tried to discuss these things. It was a complete waste of time.

Sorry you feel this way. I don't remember you saying anything about SAS.
Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#243 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

In reply to Luben Tuikov
Quoted 3 lines

I say, when people are losing it on the technical front, they try to attack personally and on political basis.

Luben,

to be honest, a lot of people got exactly the impression that you've been doing that from the start in this saga, by attacking Christophs and James' integrity early on etc. Jeff has been just about the only person who ignored that and kept talking to you, and now you're attacking him too... I'm not sure what you're trying to achieve. But I'm pretty sure this way isn't the best or easiest way to achieve that.

Greetings,
Arjan van de Ven

#244 lore raw

Re: ioctls, etc. (was Re: [PATCH 1/4] sas: add flag for locally attached PHYs)

Quoted 4 lines · Arjan van de Ven
Quoted 2 lines

I say, when people are losing it on the technical front, they try to attack personally and on political basis.

Quoted 8 lines

Luben,

to be honest, a lot of people got exactly the impression that you've been doing that from the start in this saga, by attacking Christophs and James' integrity early on etc. Jeff has been just about the only person who ignored that and kept talking to you, and now you're attacking him too... I'm not sure what you're trying to achieve. But I'm pretty sure this way isn't the best or easiest way to achieve that.

No, look back on this thread -- he started a personal attack first. Here is the email:
http://marc.theaimsgroup.com/?l=linux-scsi&m=112991877716308&w=2

This is where the "you don't understand" personal attacks from Jeff start.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#245 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Andrew Patterson
Quoted 7 lines · Andrew Patterson

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner of it). My personal preference is to hide this stuff in a library, so the kernel implementation is hidden. But even a library needs an underlying kernel implementation.

but why didn't CSMI specify the library interface then? If it did that, then none of the "ioctls are deprecated for 3 years now" would have come as a surprise. Or rather, it maybe would have, but it wouldn't have mattered to the management app.

#246 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 11 lines · Arjan van de Ven
Quoted 7 lines · Andrew Patterson

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner of it). My personal preference is to hide this stuff in a library, so the kernel implementation is hidden. But even a library needs an underlying kernel implementation.

Quoted 5 lines

but why didn't CSMI specify the library interface then? If it did that, then none of the "ioctls are deprecated for 3 years now" would have come as a surprise. Or rather, it maybe would have, but it wouldn't have mattered to the management app.

I asked one of the authors, Steve Fairchild, about this. He said that they had had a bad experience with HBAAPI, the FC library. They had a lot of problems with vendors keeping the library up to date, multiple vendors shipping multiple incompatible versions, etc. I wasn't entirely convinced, since they seem to have just replaced one set of problems for another.

Andrew

#247 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 8 lines
Quoted 7 lines

but why didn't CSMI specify the library interface then? If it did that, then none of the "ioctls are deprecated for 3 years now" would have come as a surprise. Or rather, it maybe would have, but it wouldn't have mattered to the management app.

Quoted 6 lines

I asked one of the authors, Steve Fairchild, about this. He said that they had had a bad experience with HBAAPI, the FC library.

They had a
lot of problems with vendors keeping the library up to date

that's not too hard (and up to date is relative)

Quoted 2 lines

, multiple
vendors shipping multiple incompatible versions, etc.

which sounds like they didn't get the spec right.. if the spec was good that couldn't happen at all...

#248 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Andrew Patterson
Quoted 11 lines · Andrew Patterson
Quoted 4 lines

but why didn't CSMI specify the library interface then? If it did that, then none of the "ioctls are deprecated for 3 years now" would have come as a surprise. Or rather, it maybe would have, but it wouldn't have mattered to the management app.

I asked one of the authors, Steve Fairchild, about this. He said that they had had a bad experience with HBAAPI, the FC library. They had a lot of problems with vendors keeping the library up to date, multiple vendors shipping multiple incompatible versions, etc. I wasn't entirely convinced, since they seem to have just replaced one set of problems for another.

The user app would read the SDI major and minor from SDI_GET_DRIVER_INFO and then know which spec to use.

After that just sending bytes of data (forming units) one after the other (as in "smp_portal") would suffice for 32/64 bit (similarly to SG).

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#249 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Andrew Patterson
Quoted 4 lines · Andrew Patterson

My guess is that what current app writers want is to use IOCTL's so they don't have to special-case Linux. Next best thing would be something that closely approaches it, to avoid re-writing a lot of code.

"to avoid re-writing a lot of code." is also what I'm driving at. I'm sure HP as well as LSI have a lot of user space programs using the SDI interface.

Quoted 7 lines
Quoted 1 line

Rejected by whom? "The community" or by you?

I believe there is a common understanding that IOCTL's are bad and should be avoided. See:

http://lkml.org/lkml/2001/5/20/81

I wasn't talking about IOCTLs. I was talking in general about the SDI spec. As you can see for yourself, I suggested an SDI interface which is agnostic to the front end.

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

HP decided to move ahead despite that and did a huge mis-services to their customers.

Perhaps. Given that there seems to be no alternative, we don't have much of a choice.

Please do *NOT* cross-reply. It was Christoph who said that, NOT ME.

Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

It's not my problem if big companies can't listen and do things their customers have to pay for, and it's certainly not our job to work around their idiocy.

Quoted 7 lines

Yes, CSMI should have had more Linux input when it was developed. The no-new IOCTL policy certainly came as a surprise to the authors. Still, there doesn't seem to be any other usable cross-platform interface that is acceptable to the linux community (or at least to Christoph)'s corner of it). My personal preference is to hide this stuff in a library, so the kernel implementation is hidden. But even a library needs an underlying kernel implementation.

Please do *NOT* cross-reply. It was Christoph who said that, NOT ME.

Quoted 6 lines
Quoted 6 lines

Bold statment.

Who should "big companies" listen to? You? "The community?" Are you saying "big companies" whould listen to Linux which says "no to specs" among other things?

Quoted 8 lines
Quoted 4 lines

Often enough what "big companies" agree on and use and deploy is what Linux (you?) should _listen_ to, try to understand and maybe get out of the way.

Big companies often want to do things in a proprietary fashion. I personally would prefer to see a standard's-based approach.

I think SDI is what we're talking about here.

Quoted 5 lines
Quoted 2 lines

It is all about customer satisfaction, which is completely foreign to Linux, simply because of the _nature_ of Linux.

More bold statements? ;-)

No, its just reality. It appears that you have had very little interaction with your software engineers about "compatibility". Also read the Linux blurb on kernel.org, the "What is Linux?" one.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/
#250 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Moore, Eric Dean
Quoted 4 lines · Eric Dean
Quoted 1 line · Luben Tuikov

On 10/19/05 16:08, Moore, Eric Dean wrote:

<snip>

Quoted 6 lines

Luben suggestion(correct me if I'm wrong) is this should be done thru user space, instead of exporting this in the /sys/class/sas_phy attributes. Thus we need to export a SMP_PASSTHRU mechanism. I believe there is discussion by Christoph ( and I believe Luben backs this idea) of doing all this thru the /dev/sg interface.

Folks,
Just a suggestion if you want to bring /dev/sg into the picture for a SMP (and even a STP) passthrough. The host could define a lun (pick a number) and the LLDD could supply the target code for it (as scsi_debug does for example).

Details need to be sorted out (e.g. pdt of "host" lun) and a way to pass an 8 byte SAS address through a SCSI cdb (there are lots of vendor specific SCSI opcodes available). For a STP pass through, we have the SAT ATA PASS THROUGH SCSI commands already defined (although they don't allow for an 8 byte target (SAS) address).

SG_IO code paths through the SCSI subsystem are pretty well tested and are available in all lk 2.4 and 2.6 kernels. All OSes that I am aware of have some sort of SCSI pass through mechanism so this approach bypasses the objection to adding new ioctls (from both Microsoft and Linux).

The idea is not original. Windows 2000 has a lun for just this purpose (and it was dropped in Windows 2003).

Doug Gilbert

#251 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 2 lines · Douglas Gilbert

Just a suggestion if you want to bring /dev/sg into the picture for a SMP (and even a STP) passthrough.

Yep. That's another possibility, that falls into the 'block driver' category [see list of categories in my 'ioctl' email], since it is translated into a 'special' block request, and then sent to a normal request_queue.

Jens Axboe's bsg[1] has also been mentioned in the context of SMP.

Jeff

[1] http://lwn.net/Articles/96547/

#252 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

Quoted 6 lines · Jeff Garzik
Quoted 2 lines · Douglas Gilbert

Just a suggestion if you want to bring /dev/sg into the picture for a SMP (and even a STP) passthrough.

Quoted 6 lines

Yep. That's another possibility, that falls into the 'block driver' category [see list of categories in my 'ioctl' email], since it is translated into a 'special' block request, and then sent to a normal request_queue.

Jens Axboe's bsg[1] has also been mentioned in the context of SMP.

Jeff,
Yes, I like the bsg model: one well known device (/dev/bsg), get a file descriptor and then bind to a "target". It reminded me of a network interface.

As presented, it only bound to a block (or char?) device node (e.g. /dev/sda). I asked some questions about widening the variety of things it could bind to but Peter Jones suggested that binding was a necessary evil that should not be encouraged.

So perhaps we could bind to a SAS host ... (and a SCSI device for those pesky things like safte, ses and wluns).

Doug Gilbert

#253 lore raw

Re: [PATCH 1/4] sas: add flag for locally attached PHYs

In reply to Douglas Gilbert
Quoted 8 lines · Douglas Gilbert
Quoted 6 lines

Luben suggestion(correct me if I'm wrong) is this should be done thru user space, instead of exporting this in the /sys/class/sas_phy attributes. Thus we need to export a SMP_PASSTHRU mechanism. I believe there is discussion by Christoph ( and I believe Luben backs this idea) of doing all this thru the /dev/sg interface.

Quoted 6 lines

Folks,
Just a suggestion if you want to bring /dev/sg into the picture for a SMP (and even a STP) passthrough. The host could define a lun (pick a number) and the LLDD could supply the target code for it (as scsi_debug does for example).

Doug, there is no reason to follow someone else's OS broken path.

Your question above is SDI addressability. And the answer is _right_ in the SDI spec: SDI is addressable as per "controller". That is each "controller" on the PCI/IO bus provides an SDI portal. This is overly evident by at least looking at the SDI_GET_CNTLR_CONFIG function.

This allows for controllers who do not have SCSI LLDDs but block or RAID LLDD to also be able to export an SDI portal.

So in effect the SDI portal would have to be hooked to the PCI device which claims a base class of 01h -- mass storage controller.

So when the provider calls

	sdi_register_provider(sdi_prov);

it fill out the pcidev member in

struct sdi_provider_struct {
	char           *name;
	struct pci_dev *pcidev;
	...
	struct sdi_functions_struct sdi_functions;
	...
};

from my example yesterday. And the file drivers/scsi/sdi/sdi.c creates a binary file attr (front end, could be another way) in /sys/devices/pciABCD:EF/.../sdi_portal.

Luben

Signature · 2 lines
http://linux.adaptec.com/sas/
http://www.adaptec.com/sas/