Martin Pieuchot wrote:
> I'd like to force a yield() for every pool_get(9) using PR_WAITOK, just
> like we do with malloc(9), in order to ensure that the NET_LOCK() is not
> held across context switches.
>
> ok?
Is there an assertwaitok() missing? Indeed there is. I think that should be
added, l
On 24/01/17(Tue) 08:06, Christiano F. Haesbaert wrote:
> Not sure I get it, the rwlock when is not released when you yield()). So
> this will in fact context switch holding the rwlock for every pool_get().
> Did I miss another a change ?
That's true. I'd like to know when that happens and where.
On Tue, 24 Jan 2017 at 09:14, Martin Pieuchot wrote:
> On 24/01/17(Tue) 08:06, Christiano F. Haesbaert wrote:
>
> > Not sure I get it, the rwlock when is not released when you yield()). So
>
> > this will in fact context switch holding the rwlock for every pool_get().
>
> > Did I miss another a c
l *pp, int flags)
>
> }
>
> mtx_leave(&pp->pr_mtx);
>
>
>
> - if (slowdown && ISSET(flags, PR_WAITOK))
>
> + if ((slowdown || pool_debug == 2) && ISSET(flags, PR_WAITOK))
>
> yield();
>
>
>
> if (v == NULL) {
>
>
>
>
4 Jan 2017 06:29:09 -
> @@ -513,7 +513,7 @@ pool_get(struct pool *pp, int flags)
> }
> mtx_leave(&pp->pr_mtx);
>
> - if (slowdown && ISSET(flags, PR_WAITOK))
> + if ((slowdown || pool_debug == 2) && ISSET(flags, PR_WAITOK))
> yield();
>
> if (v == NULL) {
>
- if (slowdown && ISSET(flags, PR_WAITOK))
+ if ((slowdown || pool_debug == 2) && ISSET(flags, PR_WAITOK))
yield();
if (v == NULL) {
ame, or it's something odd with my setup.
> I'm testing by running tcpbench on two other machines, with the
> traffic routed through the alix, ethernet->ethernet, not natted.
>
> With pool_debug enabled (sysctl kern.pool_debug=1) as is default
> in -current, I'm see
Seeing some odd behaviour on an alix firewall and wondering if
other people see the same, or it's something odd with my setup.
I'm testing by running tcpbench on two other machines, with the
traffic routed through the alix, ethernet->ethernet, not natted.
With pool_debug en
On Sun, Apr 03, 2011 at 06:38:51PM -0600, Theo de Raadt wrote:
> based on a conversation at the bar.
>
> POOL_DEBUG is expensive. But we really want it because it finds bugs
> before they hurt us. The solution to this is to make it simpler to
> turn off.
>
> This diff s
> Date: Sun, 03 Apr 2011 18:38:51 -0600
> From: Theo de Raadt
>
> based on a conversation at the bar.
>
> POOL_DEBUG is expensive. But we really want it because it finds bugs
> before they hurt us. The solution to this is to make it simpler to
> turn off.
>
> Th
On Sun, 3 Apr 2011, Theo de Raadt wrote:
> based on a conversation at the bar.
>
> POOL_DEBUG is expensive. But we really want it because it finds bugs
> before they hurt us. The solution to this is to make it simpler to
> turn off.
Is it expensive because it tests every pool
based on a conversation at the bar.
POOL_DEBUG is expensive. But we really want it because it finds bugs
before they hurt us. The solution to this is to make it simpler to
turn off.
This diff starts the kernel with pool debug on, but allows it to be
turned off with sysctl kern.pool_debug=0
12 matches
Mail list logo