On 02/ 2/10 05:59 AM, Steven Stallion wrote:
vinayak holikatti wrote:
Hello Folks,
I need to know what exactly D_MP flag mean? If D_MP flag is absent then
what the OS do? Whether it will run the driver in single threaded mode?
All drivers must have the D_MP specified (I believe Michael Li just
posted an xref to the responsible source).
If you would like a better explanation, look at the top of page 99 in
Writing Device Drivers (WDD). It should better explain what flags may be
passed in to the cb_flag field of cb_ops and what effect they have.
The history on D_MP is that at one point, much earlier in the Solaris
history, we used to support drivers that were *not* fully safe for use
in multithreaded kernels. The reason for this was to facilitate porting
from SunOS 4.x, which did not have a multi-threaded kernel.
For such drivers a "Big Lock" was used to provide protection, but that
proved to be very performance limiting.
Modern Solaris -- going back to at least Solaris 2.5, and I suspect
considerably further back than even that -- I suspect 2.3 but I've not
checked, requires drivers to claim to be fully MT-safe by supplying the
D_MP flag.
These days, we could probably just remove the flag and the check, since
there are not any drivers still in use that are not MT-safe, but it
remains as a bit of history.
- Garrett
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss