Re: [PATCH] f_op->poll() without lock_kernel()

From: David S. Miller (davem@redhat.com)
Date: Sat Apr 22 2000 - 22:35:30 EST


   Date: Sat, 22 Apr 2000 22:32:22 -0400 (EDT)
   From: Alexander Viro <viro@math.psu.edu>

   BTW, if somebody wants the same sans ->fcntl() removal - tell and I'll
   send it (I _really_ have other things to worry about and I'm less than
   enthusiastic about picking fights over that interface - I think that
   ->fcntl() is strange method to have, but...)

I think fcntl is a dumb method to have for the protocols. BSD doesn't
provide one either. Furthermore, we've changed the networking
interfaces so much anyways, and if some third party is using fcntl for
some strange protocol, they can ask us to return it. Trust me,
they'll complain to one of us if they do make use of it :-)

   What I really don't like about the thing is the ->poll() interface. Here I
   _have_ some interest - it's used in NCPFS RPC. The main problem being: I
   would rather live without struct file for link to server. However, with
   sock->ops->poll() we have to keep one. Notice that

 ...

           c) in all cases except the net/atm/* stuff <queue> is
   sock->sk->sleep. In case of ATM we could set sock->sk->sleep so that it
   would point into the right place - no problems with that.
           d) if we declare that all poll-related events come at
   sock->sk->sleep (AFAICS reasonable) we could go for unsigned poll(sock)
   and leave poll_wait() to caller (normally sock_poll()).
           e) in many cases we are interested in ->poll() functionality, but
   couldn't care less for file. If we were guaranteed that ->sk->sleep points
   to the right wait queue we could get rid of quite a piece of mess in NCPFS
   RPC and potentially in other places.

I would really want to hold on this until we find out from Werner
Almesber how easy it would be to change the ATM socket stuff in the
way you describe. Can you have a quick email converstaion with him
(almesber@lrc.epfl.ch) to work this out? Past this, I would have
no problem removing the file struct arg from the protocol dependent
poll operation and just have sock_poll do the poll_wait.

Later,
David S. Miller
davem@redhat.com

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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:21 EST