linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: viro@zeniv.linux.org.uk,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	"linux-kernel" <linux-kernel@vger.kernel.org>,
	"linux-media" <linux-media@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: Can you review or ack this patch?
Date: Wed, 7 Sep 2011 16:51:03 -0700	[thread overview]
Message-ID: <20110907165103.41b8b252.akpm@linux-foundation.org> (raw)
In-Reply-To: <201108230833.25812.hverkuil@xs4all.nl>

On Tue, 23 Aug 2011 08:33:25 +0200
Hans Verkuil <hverkuil@xs4all.nl> wrote:

> (and resent again, this time with the correct linux-fsdevel mail address)
> (Resent as requested by Andrew Morton since this is still stuck)
> 
> Hi Al, Andrew,
> 
> Can you take a look at this patch and send an Ack or review comments?
> 
> It's already been reviewed by Jon Corbet and we really need this functionality
> for v3.1. You were in the CC list in earlier postings:
> 
> Here: http://www.spinics.net/lists/linux-fsdevel/msg46753.html
> and here: http://www.mail-archive.com/linux-media@vger.kernel.org/msg34546.html
> 
> The patch also featured on LWN: http://lwn.net/Articles/450658/
> 
> Without your ack Mauro can't upstream this and we have a number of other
> patches that depend on this and are currently blocked.
> 
> We would prefer to upstream this patch through the linux-media git tree
> due to these dependencies.
> 
> My git branch containing this and the dependent patches is here:
> 
> http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/poll
> 
> Your help would be greatly appreciated (and your ack even more :-) )!

I'll grab the patch to get it a bit of testing while Al cogitates.

> 
> 
> [PATCH] poll: add poll_requested_events() function
> 
> In some cases the poll() implementation in a driver has to do different
> things depending on the events the caller wants to poll for. An example is
> when a driver needs to start a DMA engine if the caller polls for POLLIN,
> but doesn't want to do that if POLLIN is not requested but instead only
> POLLOUT or POLLPRI is requested. This is something that can happen in the
> video4linux subsystem.
> 
> Unfortunately, the current epoll/poll/select implementation doesn't provide
> that information reliably. The poll_table_struct does have it: it has a key
> field with the event mask. But once a poll() call matches one or more bits
> of that mask any following poll() calls are passed a NULL poll_table_struct
> pointer.
> 
> The solution is to set the qproc field to NULL in poll_table_struct once
> poll() matches the events, not the poll_table_struct pointer itself. That
> way drivers can obtain the mask through a new poll_requested_events inline.
> 
> The poll_table_struct can still be NULL since some kernel code calls it
> internally (netfs_state_poll() in ./drivers/staging/pohmelfs/netfs.h). In
> that case poll_requested_events() returns ~0 (i.e. all events).
> 
> Since eventpoll always leaves the key field at ~0 instead of using the
> requested events mask, that source was changed as well to properly fill in
> the key field.

It would be nice to find some suitable place in the code where we can
explain all this to other potential users of the capability.  Perhaps
the implementation site for the currently undocumented
poll_requested_events() would be a suitable place.

>
> ...
>
> -	epi->event.events = event->events;
> +	epi->event.events = pt.key = event->events;

coding style nit: we generally try to avoid multiple assignemnts like this.

>
> ...
>


  parent reply	other threads:[~2011-09-07 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23  6:33 Can you review or ack this patch? Hans Verkuil
2011-08-23  6:35 ` Al Viro
2011-08-30  7:31   ` Hans Verkuil
2011-09-07 23:51 ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-08  7:49 Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110907165103.41b8b252.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).