Fairness of sched_poll

Holger Hans Peter Freyther hfreyther at sysmocom.de
Thu Oct 17 12:42:42 UTC 2013


On Thu, Oct 17, 2013 at 01:42:51PM +0200, Andreas Eversberg wrote:

> if a poll_fn is in the past (time skew or no response),
> pcu_rx_time_ind() will discover that.

I stumbled on this code earlier today. From a software engineering
point of view this code (and the other PCU code) is really
problematic.

The concern of the pcu_rx_time_ind is to convert from low-level
hardware primtive to inform other parts of the system. It should
not be responsible for TBF/SBA timeout handling. It is the application
of information hiding (encapsulation) and this concept is quite
old.

If one manages to apply information hiding and create proper modules
the complexity of the code is reduced (e.g. no unexpected side
effects, modifications to internal state of a tbf) and one can start
to test the parts of the application.

In terms of software engineering one should always ask the question
of what is the secret of this class/module/function...

holger




-- 
- Holger Freyther <hfreyther at sysmocom.de>       http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Schivelbeiner Str. 5
* 10439 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte





More information about the osmocom-net-gprs mailing list