Skip to contentSkip to conversation

i386: always use 4k stacks

PATCH Robert Hancock 13 participants 30 messages Nov 15, 2005 – Nov 20, 2005 5 messages not in the archive

lore
Share & tools
lore
#5 lore raw
In reply to a message not in the archive
Quoted 4 lines · Giridhar Pemmasani

Shouldn't I have to prevent scheduler from changing the tasks when executing Windows code? Otherwise, kernel gets wrong current thread information, which is based on stack pointer. This is the stumbling block for implementing private stacks.

As long as preemption is disabled when the driver code is executing I don't see how this would happen.. I don't know much of how ndiswrapper does things but if the driver calls back into your code then you'd just have to change the stack back before doing anything that could schedule.

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/
#6 lore raw
Quoted 7 lines · Robert Hancock
Quoted 4 lines · Giridhar Pemmasani

Shouldn't I have to prevent scheduler from changing the tasks when executing Windows code? Otherwise, kernel gets wrong current thread information, which is based on stack pointer. This is the stumbling block for implementing private stacks.

As long as preemption is disabled when the driver code is executing

Um, but it's really really bad for drivers to do that.

Lee

#7 lore raw
Quoted 3 lines · Lee Revell
Quoted 1 line

As long as preemption is disabled when the driver code is executing

Um, but it's really really bad for drivers to do that.

Normally yes.. but that may be a sacrifice that may have to be made considering what ndiswrapper is doing - inserting blobs of code into the kernel that were never designed to run there. I would think that would be something you would want to do with such a driver regardless of stack switching - do we have any way of knowing whether the Windows driver is doing some timing-dependent thing that will cause bad things to happen if we take away the CPU from it in the middle?

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/
#8 lore raw
In reply to Lee Revell
Quoted 10 lines · Lee Revell
Quoted 7 lines · Robert Hancock
Quoted 4 lines · Giridhar Pemmasani

Shouldn't I have to prevent scheduler from changing the tasks when executing Windows code? Otherwise, kernel gets wrong current thread information, which is based on stack pointer. This is the stumbling block for implementing private stacks.

As long as preemption is disabled when the driver code is executing

Um, but it's really really bad for drivers to do that.

And loading Windows drivers into the kernel isn't ? I think we're already in no-mans land here.

Remember, we have no clue what those drivers are even doing. Preemption is the least of its problems.

Dave

#34 lore raw
In reply to Lee Revell
Quoted 1 line · Lee Revell

Um, but it's really really bad for drivers to do that.

Not really. The Windows driver calls kernel API (in this case ndiswraper functions) whenever it needs to wait on an event, sleep etc. So if preempt is enabled on the way back (from Windows driver to Linux kernel call), it shouldn't be a problem as far as preempt is concerned.

Giri

#9 lore raw
In reply to Dave Jones
Quoted 12 lines · Dave Jones
Quoted 10 lines · Lee Revell
Quoted 7 lines · Robert Hancock
Quoted 4 lines · Giridhar Pemmasani

Shouldn't I have to prevent scheduler from changing the tasks when executing Windows code? Otherwise, kernel gets wrong current thread information, which is based on stack pointer. This is the stumbling block for implementing private stacks.

As long as preemption is disabled when the driver code is executing

Um, but it's really really bad for drivers to do that.

Quoted 11 lines

And loading Windows drivers into the kernel isn't ? I think we're already in no-mans land here.

Remember, we have no clue what those drivers are even doing. Preemption is the least of its problems.

Dave

NetWare used 16K stacks in kernel by default. 4K is not enough room. I have to dance around a lot of issues with 4K stacks. I haven't followed who came up with the idea to limit stacks to 4K, but they should have the option of 4-16K. NeWare 5.0 started using 32 Stacks for all the compression support and FS crap, but 16K was a good number.

Why does the kernel need to be limited to 4K? for kernel preemption?

Someone needs to fix this. It's busted. It makes porting code between Windows and Linux and other OS's difficult to support.

Jeff

#10 lore raw
Quoted 1 line · Jeff V. Merkey

NetWare used 16K stacks in kernel by default.

unsubscribe netware-kernel

#11 lore raw
Quoted 7 lines · Dave Jones
Quoted 1 line · Jeff V. Merkey

NetWare used 16K stacks in kernel by default.

unsubscribe netware-kernel

Making the point that in 1990, folks had grown beyond 4K stacks in kernels, along with MS DOS 640K Limitations.

:-)

Jeff

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

#12 lore raw
Quoted 4 lines · On Monday November 14, [email protected] wrote:
Quoted 2 lines · Dave Jones

On Mon, Nov 14, 2005 at 08:26:45PM -0700, Jeff V. Merkey wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

NetWare used 16K stacks in kernel by default.

unsubscribe netware-kernel

Making the point that in 1990, folks had grown beyond 4K stacks in kernels, along with MS DOS 640K Limitations.

But I seem to remember learning in CS101 (or whatever we called it), that the stack grows down and the heap grows up.
So if 'folks had grown beyond 4K stacks', I guess they must be at 2K stacks ?->

NeilBrown

Quoted 4 lines

:-)

Jeff

#13 lore raw
Quoted 23 lines · Neil Brown
Quoted 11 lines · On Monday November 14, [email protected] wrote:
Quoted 7 lines · Dave Jones
Quoted 3 lines · Jeff V. Merkey

NetWare used 16K stacks in kernel by default.

Quoted 8 lines
Quoted 5 lines

unsubscribe netware-kernel

Making the point that in 1990, folks had grown beyond 4K stacks in kernels, along with MS DOS 640K Limitations.

Quoted 8 lines

But I seem to remember learning in CS101 (or whatever we called it), that the stack grows down and the heap grows up.
So if 'folks had grown beyond 4K stacks', I guess they must be at 2K stacks ?->

NeilBrown

Great point, and you are correct that MS DOS had bigger stacks than 4K. Onward through the fog ....

Jeff

#14 lore raw
Quoted 2 lines · Jeff V. Merkey

Great point, and you are correct that MS DOS had bigger stacks than 4K. Onward through the fog ....

And Linux had stacks bigger than 4K until recently and could be made bigger again. But 4K stacks are not considered a regression, but a feature (ie: a good thing). So I guess you're not impressing lots of people saying that msdos had bigger stacks...

#15 lore raw
Quoted 9 lines · On Tue, 2005-11-15 at 14:18 +0100, Tue, 15 Nov 2005 14:18:51 +0100 wrote:
Quoted 2 lines · Jeff V. Merkey

Great point, and you are correct that MS DOS had bigger stacks than 4K. Onward through the fog ....

And Linux had stacks bigger than 4K until recently and could be made bigger again.

well ......

in 2.4 kernels you had a 4K stack as well (even though it was 8Kb in size, you lost 1.5Kb to the task struct and you lost 2 to 2.5 Kb to irq context, net usable was 4Kb). In 2.6 the task struct moved off the stack, and the 4KSTACK feature allowed you to split the irq stack usage off to a seperate stack, still giving you 4Kb available.. that's still the same as 2.4 effectively. 2.6 also has (and I wish it becomes "had" soon) an option to get 6Kb effective stack space instead. This is an increase of 2Kb compared to 2.4.

#16 lore raw
Quoted 3 lines · Arjan van de Ven

the same as 2.4 effectively. 2.6 also has (and I wish it becomes "had" soon) an option to get 6Kb effective stack space instead. This is an increase of 2Kb compared to 2.4.

It has been asked couple of times before in this context and no one cared to answer:

Using 4k stacks may have advantages, but what compelling reasons are there to drop the choice of 4k/8k stacks? You can make 4k stacks default, but why throw away the option of 8k stacks, especially since the impact of this option on the kernel implementation is very little?

Giri

#17 lore raw
Quoted 6 lines · Giridhar Pemmasani
Quoted 3 lines · Arjan van de Ven

the same as 2.4 effectively. 2.6 also has (and I wish it becomes "had" soon) an option to get 6Kb effective stack space instead. This is an increase of 2Kb compared to 2.4.

Quoted 7 lines

It has been asked couple of times before in this context and no one cared to answer:

Using 4k stacks may have advantages, but what compelling reasons are there to drop the choice of 4k/8k stacks? You can make 4k stacks default, but why throw away the option of 8k stacks, especially since the impact of this option on the kernel implementation is very little?

One important point is to get remaining problems reported:

All the known issues in e.g. xfs, dm or reiser4 should have been addressed.

But how many issues have never been reported because people noticed that disabling CONFIG_4KSTACKS fixed the problem for them and therefore didn't report it?

I experienced something similar with my patch to schedule OSS drivers with ALSA replacements for removal - when someone reported he needed an OSS driver for $reason I asked him for bug numbers in the ALSA bug tracking system - and the highest number were 4 new bugs against one ALSA driver.

Unconditionally enabling 4k stacks is the only way to achieve this.

And the fact that it might force people to help with the development or at least use open source drivers for their hardware instead of binary-only Windows drivers isn't exactly a disadvantage for the development of Linux.

Quoted 1 line

Giri

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#18 lore raw

On Tue, 15 Nov 2005 19:55:43 +0100, Adrian Bunk <[email protected]> said:

Adrian> And the fact that it might force people to help with the Adrian> development or at least use open source drivers for their Adrian> hardware instead of binary-only Windows drivers isn't Adrian> exactly a disadvantage for the development of Linux.

IMO, this is at best only one side of the coin: Many people that ask for help with ndiswrapper seem to be newbies that have just begun using Linux. Most of these people can't/won't help with development of native drivers. On the other hand, ndiswrapper can be used in reverse engineering. I know of at least two such cases. So thinking ndiswrapper as a scourge that hinders development (I am exaggerating a bit here, but it has been suggested so by certain people more than once on lkml) is not correct. Informed users, especially those that follow lkml, are more interested in helping development of native drivers and would chose to use native drivers if possible. Leaving other end users high and dry without wireless support until such drivers are available is not necessarily helpful for development of open source drivers.

In essence, ndiswrapper is for those chipsets that have no open source drivers until one can be developed.

This issue raises a concern for me as developer of ndiswrapper. I perceive that some kernel developers have strong opinions against ndiswrapper. I see ndiswrapper as contributing my 2 cents - I have no vested interests in ndiswrapper, although it will be sad to see lot of effort and time put into ndiswrapper go waste. However, I believe there is a need for such a project: There is a company (Linuxant) that sells a product similar to ndiswrapper, ndisulator, which is similar to ndiswrapper, is merged into FreeBSD kernel, and ndiswrapper itself has been downloaded more than half a million times from Sourceforge alone. And not all native drivers support all the features that users need, e.g., WPA, whereas ndiswrapper supports all features provided by vendor for Windows driver. And there are chipsets for which open source drivers may not be available ever since they are rare. And if it takes many months/years to develop a stable open source driver, users need some way of using their hardware until then. And so on. I am not trying to argue in favor of ndiswrapper at the cost of open source drivers, but that there is a genuine need for such a project, at least for now.

This is neither a complaint nor a plea; if option to chose 8k stacks is dropped in the kernel, so be it. If I find time to provide support for private 8k stacks within ndiswrapper, I will do that, so that if this patch makes into kernel, users who need some way of using the wireless cards can do so, for now.

Adrian> Unconditionally enabling 4k stacks is the only way to Adrian> achieve this.

I think this is a bit drastic. As I suggested earlier, making 4k stacks the default may be enough. For example, RedHat already distributes kernels with 4k stacks and I am not sure if you will get lot more cases, considering the popularity of RedHat.

Signature · 1 line
Giri
#19 lore raw
Quoted 7 lines · Giridhar Pemmasani

On Tue, 15 Nov 2005 19:55:43 +0100, Adrian Bunk <[email protected]> said:

Adrian> And the fact that it might force people to help with the Adrian> development or at least use open source drivers for their Adrian> hardware instead of binary-only Windows drivers isn't Adrian> exactly a disadvantage for the development of Linux.

Quoted 13 lines

IMO, this is at best only one side of the coin: Many people that ask for help with ndiswrapper seem to be newbies that have just begun using Linux. Most of these people can't/won't help with development of native drivers. On the other hand, ndiswrapper can be used in reverse engineering. I know of at least two such cases. So thinking ndiswrapper as a scourge that hinders development (I am exaggerating a bit here, but it has been suggested so by certain people more than once on lkml) is not correct. Informed users, especially those that follow lkml, are more interested in helping development of native drivers and would chose to use native drivers if possible. Leaving other end users high and dry without wireless support until such drivers are available is not necessarily helpful for development of open source drivers.

My impression is more that there is a big demand for ndiswrapper (look e.g. at your download numbers below and some statements in this thread) while support for the people developing open source drivers isn't that big.

Quoted 2 lines

In essence, ndiswrapper is for those chipsets that have no open source drivers until one can be developed.

In essency, ndiswrapper is a good excuse for hardware vendors who do not want to support the development of open source drivers, because they can always tell their costumers "Our hardware is supported by Linux through the open source ndiswrapper module".

Quoted 5 lines

This issue raises a concern for me as developer of ndiswrapper. I perceive that some kernel developers have strong opinions against ndiswrapper. I see ndiswrapper as contributing my 2 cents - I have no vested interests in ndiswrapper, although it will be sad to see lot of effort and time put into ndiswrapper go waste. However, I believe

My personal opinion is that the ability to use unmodified binary-only Windows drivers under Linux is really a cool project - and this is meant in a 100% positive sense.

But a side effect is a worse open source support for the hardware in question.

Quoted 5 lines

there is a need for such a project: There is a company (Linuxant) that sells a product similar to ndiswrapper, ndisulator, which is similar to ndiswrapper, is merged into FreeBSD kernel, and ndiswrapper itself has been downloaded more than half a million times from Sourceforge alone. And not all native drivers support all the features that users

Quoted 8 lines

need, e.g., WPA, whereas ndiswrapper supports all features provided by vendor for Windows driver. And there are chipsets for which open source drivers may not be available ever since they are rare. And if it takes many months/years to develop a stable open source driver, users need some way of using their hardware until then. And so on. I am not trying to argue in favor of ndiswrapper at the cost of open source drivers, but that there is a genuine need for such a project, at least for now.

As I tried to express above, both current end users and hardware vendors might like ndiswrapper, but as a side effect there are less and/or worse open source drivers.

It partially boils down to the question whether it's better for Linux to get as much hardware supported now no matter how, or whether it's better to have less hardware supported with good open source drivers and with end users putting pressure on hardware vendors to help people developing open source drivers.

And there's also the side effect that a poorly written Windows driver might crash the Linux kernel. Many end users will attribute such a crash to the Linux kernel harming the reputation of Linux as being stable.

Quoted 6 lines

This is neither a complaint nor a plea; if option to chose 8k stacks is dropped in the kernel, so be it. If I find time to provide support for private 8k stacks within ndiswrapper, I will do that, so that if this patch makes into kernel, users who need some way of using the wireless cards can do so, for now.
...

It's not the main purpose of my patch to break ndiswrapper, that is a collateral damage - but IMHO a positive one.

And we are talking about open source.

You are free to solve the stack problem in ndiswrapper (which might already be requierd for some drivers that aren't even happy with the current stack limit), or you can tell people to undo my patch or whatever.

Quoted 1 line

Giri

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#31 lore raw
In reply to Giridhar Pemmasani
Quoted 5 lines · Giridhar Pemmasani
Quoted 3 lines · Arjan van de Ven

the same as 2.4 effectively. 2.6 also has (and I wish it becomes "had" soon) an option to get 6Kb effective stack space instead. This is an increase of 2Kb compared to 2.4.

Quoted 7 lines

It has been asked couple of times before in this context and no one cared to answer:

Using 4k stacks may have advantages, but what compelling reasons are there to drop the choice of 4k/8k stacks? You can make 4k stacks default, but why throw away the option of 8k stacks, especially since the impact of this option on the kernel implementation is very little?

Once everything in the kernel tree has been cleaned up to work with 4k stacks, then none of the in-kernel drivers need this option. No future kernel drivers will be accepted into the tree if they don't work with 4k stacks, either. Therefore, the 8k stack option becomes something _only_ needed for out-of-tree drivers, and if out-of-tree drivers need >4k stacks they can maintain the 8k patch out of tree along with said driver.

Why is this difficult to understand? The "impact on the implementation" of having 100 extra exports of random internal kernel symbols is fairly small as well (from a lines of code perspective), but on a policy level it ain't gonna happen.

Rob

#23 lore raw
In reply to Adrian Bunk
Quoted 21 lines · Adrian Bunk
Quoted 7 lines · Giridhar Pemmasani
Quoted 3 lines · Arjan van de Ven

the same as 2.4 effectively. 2.6 also has (and I wish it becomes "had" soon) an option to get 6Kb effective stack space instead. This is an increase of 2Kb compared to 2.4.

Quoted 7 lines

It has been asked couple of times before in this context and no one cared to answer:

Using 4k stacks may have advantages, but what compelling reasons are there to drop the choice of 4k/8k stacks? You can make 4k stacks default, but why throw away the option of 8k stacks, especially since the impact of this option on the kernel implementation is very little?

One important point is to get remaining problems reported:

Quoted 7 lines

All the known issues in e.g. xfs, dm or reiser4 should have been addressed.

But how many issues have never been reported because people noticed that disabling CONFIG_4KSTACKS fixed the problem for them and therefore didn't report it?

I experienced something similar with my patch to schedule OSS drivers with ALSA replacements for removal - when someone reported he needed an OSS driver for $reason I asked him for bug numbers in the ALSA bug tracking system - and the highest number were 4 new bugs against one ALSA driver.

Unconditionally enabling 4k stacks is the only way to achieve this.

The problem is that you persist in saying "the only way to achieve this" without admiting that some people are questioning the need to run in 4k stacks. The only argument I have seen for 4k stacks is that memory is allocated in 4k blocks and there might not be 8k contiguous available. When that's true the system is probably in deep trouble on memory anyway.

As someone pointed out using a larger memory allocation block (ie. multiple of hardware minimum page) would avoid the fragmentation, make all the bitmaps smaller, and generally have minimal effect either way on memory use. And you could make the stack size the memory allocation block size and never have to do conversions. Then the allocation size could be anything reasonable, from 4k to 32k as mentioned recently. Given the memory size of typical computers today, saving a few K per process matters as much as a beer fart in a cow barn.

Do all other non-x86 platforms use 4k stacks? Then why is it such a big thing to do it as the only choice for x86?

It seems like a lot of effort is being spent making things run in 4k stacks, with minimal consideration of what benefits are gained or if there are other ways to gain them. It just feels as though it's being done to prove it's possible. Linux is about choice, let's go back to that.

Signature · 3 lines
   -bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
 last possible moment - but no longer"  -me
#24 lore raw
Quoted 1 line · Bill Davidsen

process matters as much as a beer fart in a cow barn.

This one cracked me up :-)

Quoted 4 lines

It seems like a lot of effort is being spent making things run in 4k stacks, with minimal consideration of what benefits are gained or if there are other ways to gain them. It just feels as though it's being done to prove it's possible. Linux is about choice, let's go back to that.

I couldn't agree more.

Giri

#20 lore raw
In reply to Giridhar Pemmasani
Quoted 8 lines · Giridhar Pemmasani

In essence, ndiswrapper is for those chipsets that have no open source drivers until one can be developed.

This issue raises a concern for me as developer of ndiswrapper. I perceive that some kernel developers have strong opinions against ndiswrapper. I see ndiswrapper as contributing my 2 cents - I have no vested interests in ndiswrapper, although it will be sad to see lot of effort and time put into ndiswrapper go waste.

Does it mean that you support ndiswrapper just because you wrote it? I understand this, but it's not a valid technical reason why it should be supported.

Quoted 11 lines

However, I believe
there is a need for such a project: There is a company (Linuxant) that sells a product similar to ndiswrapper, ndisulator, which is similar to ndiswrapper, is merged into FreeBSD kernel, and ndiswrapper itself has been downloaded more than half a million times from Sourceforge alone. And not all native drivers support all the features that users need, e.g., WPA, whereas ndiswrapper supports all features provided by vendor for Windows driver. And there are chipsets for which open source drivers may not be available ever since they are rare. And if it takes many months/years to develop a stable open source driver, users need some way of using their hardware until then.

Companies got nice excuse for not giving us docs, making those months/years even longer.

Quoted 4 lines

And so on. I
am not trying to argue in favor of ndiswrapper at the cost of open source drivers, but that there is a genuine need for such a project, at least for now.

Ok, how can we make any progress on obtaining docs for TI acx wireless chipset? Or on Prism54 "softmac" chipset? The reply is "Open source driver already exists (ndiswrapper), go away".

BTW, a few of wireless developers are interested in writing _open source firmware_ (not just driver) for these, and it is not that hard to do, if only we had the docs on components which make up the device. Both of those are based on ARM processor + some specialized chips.

How can we hope to persuade companies into releasing that info when they are escaping from giving us even docs on "external" interface to their firmware with ndiswrapper argument, let alone on "internal" components?

Quoted 6 lines

This is neither a complaint nor a plea; if option to chose 8k stacks is dropped in the kernel, so be it. If I find time to provide support for private 8k stacks within ndiswrapper, I will do that, so that if this patch makes into kernel, users who need some way of using the wireless cards can do so, for now.

Quoted 7 lines

Adrian> Unconditionally enabling 4k stacks is the only way to Adrian> achieve this.

I think this is a bit drastic. As I suggested earlier, making 4k stacks the default may be enough. For example, RedHat already distributes kernels with 4k stacks and I am not sure if you will get lot more cases, considering the popularity of RedHat.

--
vda

#32 lore raw
In reply to Jeff V. Merkey
Quoted 2 lines · Jeff V. Merkey

Making the point that in 1990, folks had grown beyond 4K stacks in kernels, along with MS DOS 640K Limitations.

And Linux 8086 uses 512 byte kernel stacks, and really wants a bit of tuning to get down to 256.

Its about discipline and design not year

#33 lore raw
Quoted 10 lines · Alan Cox
Quoted 3 lines · Jeff V. Merkey

Making the point that in 1990, folks had grown beyond 4K stacks in kernels, along with MS DOS 640K Limitations.

And Linux 8086 uses 512 byte kernel stacks, and really wants a bit of tuning to get down to 256.

Quoted 10 lines

Its about discipline and design not year

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

Amen.

:-)

Jeff

#21 lore raw
In reply to Denis Vlasenko
Quoted 9 lines · Denis Vlasenko
Quoted 5 lines

This issue raises a concern for me as developer of ndiswrapper. I perceive that some kernel developers have strong opinions against ndiswrapper. I see ndiswrapper as contributing my 2 cents - I have no vested interests in ndiswrapper, although it will be sad to see lot of effort and time put into ndiswrapper go waste.

Does it mean that you support ndiswrapper just because you wrote it? I understand this, but it's not a valid technical reason why it should be supported.

What logic did you use to infer that? I only said I am continuing to develop ndiswrapper and "vested interests" comment is to indicate that I have nothing to gain by supporting ndiswrapper in Linux kernel; I am doing what I can so people with unsupported wireless cards can use them in Linux.

Quoted 7 lines

Companies got nice excuse for not giving us docs, making those months/years even longer.

Quoted 4 lines

And so on. I
am not trying to argue in favor of ndiswrapper at the cost of open source drivers, but that there is a genuine need for such a project, at least for now.

TI ACX chipset has been out long before ndiswrapper supported it. It has been years since that chipset is out. In fact, ACX 100 chipset is no longer made. Still the open source driver doesn't support WEP/WPA (I could be wrong about current status, but at least until recently it was not). As I said before, ndiswrapper is not competition to open source drivers - if anything, it could be used to understand what the Windows driver does and that may help in developing/improving open source driver.

Quoted 3 lines

BTW, a few of wireless developers are interested in writing _open source firmware_ (not just driver) for these, and it is not that hard to do, if only we had the docs on components which make up the device.

I agree. But that is big "if".

Quoted 4 lines

How can we hope to persuade companies into releasing that info when they are escaping from giving us even docs on "external" interface to their firmware with ndiswrapper argument, let alone on "internal" components?

This argument is debatable: There are wireless cards that didn't have drivers even before ndiswrapper supported them. To claim that if they are supported with anything less than an open source driver is hurting Linux is one opinion. Given a choice, many people (I myself included) would chose open source driver, but there are others that want to use the hardware they have in Linux right now. Until an open source driver is available, I am helping provide support for some hardware, so such people can use that hardware in Linux.

I also would like to point out that using NDIS drivers in Linux is not exactly same as using binary drivers: Whereas full-binary drivers hide everything, NDIS drivers use an API to do anything/everything from the kernel (e.g., to obtain/release a spinlcok, allocate/free memory etc). ndiswrapper implements that API, so one can understand what an NDIS driver is doing at the level of that API. In a way it is similar to loading firmware (that runs on CPU) into open source driver.

Giri

#25 lore raw
In reply to Adrian Bunk
Quoted 5 lines · Adrian Bunk

I experienced something similar with my patch to schedule OSS drivers with ALSA replacements for removal - when someone reported he needed an OSS driver for $reason I asked him for bug numbers in the ALSA bug tracking system - and the highest number were 4 new bugs against one ALSA driver.

Speaking of which: I've been playing with qemu recently, and the sound card it emulates is a sound blaster 16. Which only seems to have an OSS driver, no ALSA...

This is known? If so I might take a whack at porting this if I get really bored this weekend...

Rob

#26 lore raw
Quoted 7 lines · Rob Landley
Quoted 5 lines · Adrian Bunk

I experienced something similar with my patch to schedule OSS drivers with ALSA replacements for removal - when someone reported he needed an OSS driver for $reason I asked him for bug numbers in the ALSA bug tracking system - and the highest number were 4 new bugs against one ALSA driver.

Quoted 6 lines

Speaking of which: I've been playing with qemu recently, and the sound card it emulates is a sound blaster 16. Which only seems to have an OSS driver, no ALSA...

This is known? If so I might take a whack at porting this if I get really bored this weekend...

There already is an ALSA driver, check out sound/isa/sb/sb16.c:

/*
* Driver for SoundBlaster 16/AWE32/AWE64 soundcards
* Copyright (c) by Jaroslav Kysela <[email protected]>

etc

Lee

#27 lore raw
Quoted 8 lines · Lee Revell
Quoted 6 lines

Speaking of which: I've been playing with qemu recently, and the sound card it emulates is a sound blaster 16. Which only seems to have an OSS driver, no ALSA...

This is known? If so I might take a whack at porting this if I get really bored this weekend...

There already is an ALSA driver, check out sound/isa/sb/sb16.c:

Ok, so where is the config option?

find . | xargs grep CONFIG_SND_SB16
./arch/i386/defconfig:# CONFIG_SND_SB16 is not set ./arch/ppc/configs/common_defconfig:# CONFIG_SND_SB16 is not set ./arch/ppc/configs/power3_defconfig:# CONFIG_SND_SB16 is not set
./include/sound/sb.h: void *csp; /* used only when CONFIG_SND_SB16_CSP is
set */
./sound/isa/sb/Makefile:obj-$(CONFIG_SND_SB16) += snd-sb16.o snd-sb16-dsp.o snd-sb-common.o
./sound/isa/sb/Makefile:ifeq ($(CONFIG_SND_SB16_CSP),y) ./sound/isa/sb/Makefile: obj-$(CONFIG_SND_SB16) += snd-sb16-csp.o ./sound/isa/sb/sb16.c:#ifdef CONFIG_SND_SB16_CSP ./sound/isa/sb/sb16.c:#ifdef CONFIG_SND_SB16_CSP ./sound/isa/sb/sb16.c:#ifdef CONFIG_SND_SB16_CSP ./sound/isa/sb/sb16.c:#ifdef CONFIG_SND_SB16_CSP ./sound/isa/sb/sb16_main.c:#ifdef CONFIG_SND_SB16_CSP

It's in defconfig, source, and the makefile, but nowhere in Kconfig...

Rob

#28 lore raw
Quoted 5 lines · Rob Landley
Quoted 4 lines · Lee Revell
Quoted 4 lines

Speaking of which: I've been playing with qemu recently, and the sound card it emulates is a sound blaster 16. Which only seems to have an OSS driver, no ALSA...

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

This is known? If so I might take a whack at porting this if I get really bored this weekend...

There already is an ALSA driver, check out sound/isa/sb/sb16.c:

Ok, so where is the config option?

sound/isa/Kconfig:

253 config SND_SB16

254         tristate "Sound Blaster 16 (PnP)"
255         depends on SND
256         select SND_OPL3_LIB
257         select SND_MPU401_UART
258         select SND_PCM
259         select SND_GENERIC_DRIVER
260         help

261 Say Y here to include support for Sound Blaster 16 soundcards
262 (including the Plug and Play version).
263
264 To compile this driver as a module, choose M here: the module
265 will be called snd-sb16.

Lee

#29 lore raw
Quoted 6 lines · Lee Revell
Quoted 5 lines · Rob Landley
Quoted 4 lines · Lee Revell
Quoted 4 lines

Speaking of which: I've been playing with qemu recently, and the sound card it emulates is a sound blaster 16. Which only seems to have an OSS driver, no ALSA...

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

This is known? If so I might take a whack at porting this if I get really bored this weekend...

There already is an ALSA driver, check out sound/isa/sb/sb16.c:

Ok, so where is the config option?

sound/isa/Kconfig:

Ah, I see.

that entire menu doesn't show up unless you've selected ISA under the bus menu (which I thought means we probe for ISA slots, not that we don't support ISA devices built onto the motherboard).

Meanwhile, the OSS SB16 driver shows up just fine with ISA disabled in the bus menu...

Rob

#30 lore raw
Quoted 3 lines · Rob Landley

that entire menu doesn't show up unless you've selected ISA under the bus menu (which I thought means we probe for ISA slots, not that we don't support ISA devices built onto the motherboard).

Common misconception. CONFIG_ISA means "Show me drivers that need an ISA bus". Nothing more, nothing less.

You can't actually probe for the existance of an ISA slot, only (unsafely) probe for a specific ISA device by poking ports.

Dave

#22 lore raw
In reply to Denis Vlasenko
Quoted 9 lines · Denis Vlasenko
Quoted 5 lines

This issue raises a concern for me as developer of ndiswrapper. I perceive that some kernel developers have strong opinions against ndiswrapper. I see ndiswrapper as contributing my 2 cents - I have no vested interests in ndiswrapper, although it will be sad to see lot of effort and time put into ndiswrapper go waste.

Does it mean that you support ndiswrapper just because you wrote it? I understand this, but it's not a valid technical reason why it should be supported.

What logic did you use to infer that? I only said I am continuing to develop ndiswrapper. "Vested interests" comment is to indicate that I have nothing to gain by supporting ndiswrapper in Linux kernel; I am doing what I can so people with unsupported wireless cards can use them in Linux.

Quoted 11 lines

Companies got nice excuse for not giving us docs, making those months/years even longer.

Quoted 4 lines

And so on. I
am not trying to argue in favor of ndiswrapper at the cost of open source drivers, but that there is a genuine need for such a project, at least for now.

Ok, how can we make any progress on obtaining docs for TI acx wireless chipset? Or on Prism54 "softmac" chipset? The reply is "Open source driver already exists (ndiswrapper), go away".

TI ACX chipset has been out long before ndiswrapper supported it. It has been years since that chipset is out. In fact, ACX 100 chipset is no longer made. Still the open source driver doesn't support WEP/WPA (I could be wrong about current status, but at least until recently it was not). As I said before, ndiswrapper is not competition to open source drivers - if anything, it could be used to understand what the Windows driver does and that may help in developing/improving open source driver.

Quoted 3 lines

BTW, a few of wireless developers are interested in writing _open source firmware_ (not just driver) for these, and it is not that hard to do, if only we had the docs on components which make up the device.

I agree. But that is big "if".

Quoted 4 lines

How can we hope to persuade companies into releasing that info when they are escaping from giving us even docs on "external" interface to their firmware with ndiswrapper argument, let alone on "internal" components?

This argument is debatable: There are wireless cards that didn't have drivers even before ndiswrapper supported them. To claim that if they are supported with anything less than an open source driver is hurting Linux is one opinion. Given a choice, many people (I myself included) would chose open source driver, but there are others that want to use the hardware they have in Linux right now. Until an open source driver is available, I am helping provide support for some hardware, so such people can use that hardware in Linux.

I also would like to point out that using NDIS drivers in Linux is not exactly same as using binary drivers: Whereas full-binary drivers hide everything, NDIS drivers use an API to support the hardware (e.g., to obtain/release a spinlcok, allocate/free memory etc). ndiswrapper implements that API, so one can understand what an NDIS driver is doing at the level of that API.

Giri