Date: Sat, 17 Dec 2011 22:19:23 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Stefan Bethke <stb@lassitu.de> Cc: "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org> Subject: Re: Updated switch/glue patch? Message-ID: <CAJ-Vmoku5eLEYi5_DXVxK=0=4Ewn2aGepv3YUw4ApuVh_7y2%2Bw@mail.gmail.com> In-Reply-To: <CAJ-Vmon2boy7OCh_4O0MeCi0yCdZu0OYb5dxHCEK=-%2B46zBGtg@mail.gmail.com> References: <CAJ-Vmon8%2BOXQ4g752zZEB-O0BR0sFWO0QUvw--xp2jsBDkx6tQ@mail.gmail.com> <0F6CC18F-6973-42A2-AC03-F01BF59458AE@lassitu.de> <CAJ-Vmo=Y8pp4iFnw%2B1hcPae6QXFboz=a7puwgC1kVSZ3JwMgPQ@mail.gmail.com> <1100F70E-9DA9-4163-AC9A-423ECE5AA9A3@lassitu.de> <CAJ-VmonrnJ7cC6u2LsL9AGusz_%2BkSwY62Rr1__sg5U_NynJ1SQ@mail.gmail.com> <CAJ-Vmo=WSN1oLM=B2HqSHrWyOaOD9BSwwu8=1Wys0CLRJ_N-TA@mail.gmail.com> <C637C171-A1A2-4296-84FA-6DE97137DC42@lassitu.de> <CAJ-Vmon2boy7OCh_4O0MeCi0yCdZu0OYb5dxHCEK=-%2B46zBGtg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
.. also, keep in mind these configs don't currently have preemption enabled. I think that means that during DELAY(), the kernel thread doing our bitbanging is going to be spinning and not be preempted by any other process that may wish to be scheduled. Using up CPU in a busyloop is fine here (well it isn't, as it's power wasting, but that aside) but the fact that the CPU is not able to do any other real work in the meantime is annoying. Anyway, I'm fiddling with extending iicbb to have configurable bitbanging and ACK delays. The other thing you could try is to change the DELAY(10) in iicbb_ack to DELAY(1) and only increment k by one at a time. It would be nice if time-keeping was active at boot probe/attach time, so we could just use pause() and hope that is enough. But yes, time-keeping doesn't seem to be active that early. Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmoku5eLEYi5_DXVxK=0=4Ewn2aGepv3YUw4ApuVh_7y2%2Bw>