lkml.org 
[lkml]   [2005]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: best way to access device driver functions
Date
From

On Fri, 16 Sep 2005, Kyle Moffett wrote:

> On Sep 16, 2005, at 12:02:59, linux-os (Dick Johnson) wrote:
>> Somebody reported to me that there was some special "optimization"
>> in Linux that interpreted ioctl() function calls without regard to
>> the specific device that was open (gawd I hope not), and that if
>> you used "already-used" function numbers for your device-specific
>> ioctl(), then strange things would occur.
>
> IIRC, that used to be the case, but isn't anymore.
>
>> However, the kernel is now LOCKED during an ioctl() call. Older
>> Linux versions didn't lock the kernel. The upshotof this is that if
>> you have some ioctl() function that takes some time, like testing
>> the memory in your board, you will find the system unresponsive
>> during that test! You can unlock the kernel in your ioctl() if this
>> is a problem.
>
> This is *completely* wrong. The kernel used to lock_kernel() for
> *every* ioctl. Recent changes added locked and unlocked ioctls, such
> that ioctls that do not need the BKL can ignore it completely. You
> claimed to have read the code, given this typical Wrongbot statement,
> I guess I can say for sure that you didn't.
>

If you are really interested, put a 'if(kernel_locked())' in your
favorite ioctl(), and then respond with an apology.

> Cheers,
> Kyle Moffett
>
> --
> Premature optimization is the root of all evil in programming
> -- C.A.R. Hoare
>
> PS: Use a different email service! Your "I tried to kill it with
> the above dot" and bullshit apology is worth zilch. A quick
> calculation shows that over the last month and a half, you have
> sent 76 or so emails to the list, all of which have contained your
> useless 663-byte corporate message, meaning you have sent 50K of spam
> to the list over that time period, which has been distributed to
> several thousand accounts by vger, resulting in probably over 100MB
> of spam over that time period. Fix it or use a different email account!
>

There is no other email service available to many people. They
have to use whatever their company provides. I can't even access yahoo
from inside the company. If the list keeper followed the recommended
email procedure of ignoring everything after a "." in the first
column, something that is as old as email itself, then there would
not be any of the crap that a lot of emailers append.


Cheers,
Dick Johnson
Penguin : Linux version 2.6.13 on an i686 machine (5589.53 BogoMips).
Warning : 98.36% of all statistics are fiction.
.
I apologize for the following. I tried to kill it with the above dot :

****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-16 21:22    [W:0.047 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site