Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Oct 2005 23:15:32 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        net@FreeBSD.org
Subject:   Re: [REVIEW/TEST] polling(4) changes
Message-ID:  <20051001221058.G1493@epsplex.bde.org>
In-Reply-To: <20050930124000.GA45345@cell.sick.ru>
References:  <20050930124000.GA45345@cell.sick.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Sep 2005, Gleb Smirnoff wrote:

> The attached patch removes:
> ...
>  - poll in trap feature. Sorry, we can't acquire mutexes in trap(). Anyone
>    used it, anyway?

This is the most broken part of DEVICE_POLLING (which I consider to be
mostly broken).  Hopefully no one used it.  Poll in trap even polled in
debugger traps, so userland could invoke polling by debugging any program,
and ether_poll() was reentered if it was debugged (in RELENG_4, there is
no relevant locking so ether_poll() then just raced itself; in old versions
of -current I think Giant locking allowed the same since Giant is recursive;
in -current I think this causes deadlock since poll_mtx is not recursive).

> The attached patch touches only em(4) and fxp(4). I will write patches for all
> other drivers ASAP. But I don't have all the hardware, so if you are using polling(4)
> and you run FreeBSD 6 or 7, please help me with testing. ATM only em(4) driver patch
> is tested.

While you are there, please fix the configuration so that DEVICE_POLLING
is a normal option.  It is very far from being a global option.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051001221058.G1493>