[MPlayer-matrox] [PATCH] compat-ioctl glue code to make mga_vid work for 32-bit mplayer on 64-bit kernel

Dirk Porezag porezag at yahoo.com
Fri Sep 5 21:38:08 CEST 2008


Hi Attila,
Nope, no specific reason. The reasoning for putting it in was:
- I didn't delve into the rest of the module code too deeply so I don't have a good enough idea about potential race conditions there
- according to some sources on the web, classical ioctl used to run within the BKL and of lot of compat_ioctl conversion examples that I've seen used the BKL around the wrapped ioctl call
- the ioctl rate produced by mplayer seems to be fairly low, performance with and without the lock was practically identical in my tests
So I picked the "better be safe than sorry" approach. I really should have made a note in the source stating that I wasn't sure that the BKL was necessary.

In fact, I've run a version without the BKL without any problems for some time but I figured that a single CPU single person test is not a good test for race condition safeness. To wrap it up, if you're confident the locking isn't necessary, I'm quite happy with removing it.

Dirk



----- Ursprüngliche Mail ----
Von: Attila Kinali <attila at kinali.ch>
An: MPlayer on Matrox graphics cards <mplayer-matrox at mplayerhq.hu>
Gesendet: Freitag, den 5. September 2008, 11:02:45 Uhr
Betreff: Re: [MPlayer-matrox] [PATCH] compat-ioctl glue code to make mga_vid work for 32-bit mplayer on 64-bit kernel

On Mon, 1 Sep 2008 14:58:41 -0700 (PDT)
Dirk Porezag <porezag at yahoo.com> wrote:

> +static long mga_vid_compat_ioctl (struct file *file, unsigned int cmd,
> +                                  unsigned long arg) {
> +    long ret= 0;
> +    lock_kernel();
> +    ret= (long) mga_vid_ioctl((struct inode *) NULL, file, cmd, arg);
> +    unlock_kernel();
> +    return ret;

Is there any specific reason why you use here the BKL or
locking at all?

            Attila Kinali

-- 
A strange game.
The only winning move is not to play.
            -- Joshua, WarGames
_______________________________________________
MPlayer-matrox mailing list
MPlayer-matrox at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-matrox


__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 



More information about the MPlayer-matrox mailing list