Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2015 10:58:54 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Ivan Klymenko <fidaj@ukr.net>, FreeBSD Current <freebsd-current@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: [RFC] kern/kern_timeout.c rewrite in progress
Message-ID:  <CAJ-Vmo=tc-hqykhyc5bQW8qd_34PZU6yfGY8wziByA0xnR3ANQ@mail.gmail.com>
In-Reply-To: <54A92ED1.2070906@selasky.org>
References:  <54A1B38C.1000709@selasky.org> <20150101005613.4f788b0c@nonamehost.local> <54A49CA5.2060801@selasky.org> <54A4A002.8010802@selasky.org> <54A53F4F.2000003@selasky.org> <54A92ED1.2070906@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

Can you throw this into reviews.freebsd.org please? This is something
that should be very closely reviewed and tested.

(I'm going to go over this quite closely as it related to a lot of the
random crap I do ..)


-adrian


On 4 January 2015 at 04:15, Hans Petter Selasky <hps@selasky.org> wrote:
> Hi,
>
> Please find attached an updated timeout patch which also updates clients in
> the kernel area to use the callout API properly, like cv_timedwait().
> Previously there was some custom sleepqueue code in the callout subsystem.
> All of that has now been removed and we allow callouts to be protected by
> spinlocks. This allows us to tear down the callback like done with regular
> mutexes, and a "td_slpmutex" has been added to "struct thread" to atomically
> teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and
> "SWT_SLEEPQTIMO" states can now be completely removed.
>
> Summary of changes:
>
> 1) Make consistent callout API which also supports spinlocks for the
> callback function. This has been done to allow atomic callout stop of
> "td_slpcallout" without the need of many kernel threading quirks.
>
> 2) It is not allowed to migrate CPU if the timeout is restarted while the
> timeout callback is executing. Callouts must be stopped before CPU migration
> is allowed. Optionally drained.
>
> 3) Shared lock support has been removed, because it prevents atomic stop of
> the callback function.
>
> 4) A new API to drain callouts asynchronously has been added, called
> "callout_drain_async()".
>
> Please test and report any errors!
>
> Patch applies to FreeBSD-11-current as of today.
>
> Thank you!
>
> --HPS
>
>
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=tc-hqykhyc5bQW8qd_34PZU6yfGY8wziByA0xnR3ANQ>