Date: Mon, 25 Jan 2010 11:56:53 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r202965 - in stable/8/sys: kern sys Message-ID: <201001251156.o0PBurub054402@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Mon Jan 25 11:56:53 2010 New Revision: 202965 URL: http://svn.freebsd.org/changeset/base/202965 Log: MFC r201790: - Set td_slptick to 0 when moving threads out of sleepqueues. - Move td_slptick from u_int to int in order to follow 'ticks' signedness and wrap up accordingly. Sponsored by: Sandvine Incorporated Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Mon Jan 25 07:52:54 2010 (r202964) +++ stable/8/sys/kern/sched_4bsd.c Mon Jan 25 11:56:53 2010 (r202965) @@ -1050,7 +1050,7 @@ sched_wakeup(struct thread *td) updatepri(td); resetpriority(td); } - td->td_slptick = ticks; + td->td_slptick = 0; ts->ts_slptime = 0; sched_add(td, SRQ_BORING); } Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Mon Jan 25 07:52:54 2010 (r202964) +++ stable/8/sys/sys/proc.h Mon Jan 25 11:56:53 2010 (r202965) @@ -216,7 +216,7 @@ struct thread { int td_pinned; /* (k) Temporary cpu pin count. */ struct ucred *td_ucred; /* (k) Reference to credentials. */ u_int td_estcpu; /* (t) estimated cpu utilization */ - u_int td_slptick; /* (t) Time at sleep. */ + int td_slptick; /* (t) Time at sleep. */ struct rusage td_ru; /* (t) rusage information */ uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */ uint64_t td_runtime; /* (t) How many cpu ticks we've run. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001251156.o0PBurub054402>