Re: timer counter chip access mystery]

From: Petri Helenius (pete_at_he.iki.fi)
Date: 07/17/03

  • Next message: James West: "Re: Major problem with "No buffer space available" errors"
    To: "Jin Guojun [DSD]" <j_guojun@lbl.gov>
    Date: Thu, 17 Jul 2003 09:50:55 +0300
    
    

    I thought you have to use ACPI-safe if you have broken hardware and othervise
    youŽll have ACPI-fast. (which my boxes default to)

    Pete

    ----- Original Message -----
    From: "Jin Guojun [DSD]" <j_guojun@lbl.gov>
    To: "Petri Helenius" <pete@he.iki.fi>
    Cc: "Steven Hartland" <killing@barrysworld.com>; <freebsd-performance@freebsd.org>
    Sent: Thursday, July 17, 2003 2:22 AM
    Subject: Re: timer counter chip access mystery]

    > 5.1 defaults to use ACPI-safe, which calls read_counter() at least
    > three times. The total cost is 3098 ns. So, it meas that read_count()
    > cost is about 1000 ns, which is close to what the Linux does.
    >
    > The rest question is how much error will be if not to use
    > ACPI-safe? i.e., sysctl kern.timecounter.hardware=ACPI?
    >
    > -Jin
    >
    > /*
    > * Fetch current time value from reliable hardware.
    > */
    > static unsigned
    > acpi_timer_get_timecount(struct timecounter *tc)
    > {
    > return (read_counter());
    > }
    >
    > /*
    > * Fetch current time value from hardware that may not correctly
    > * latch the counter.
    > */
    > static unsigned
    > acpi_timer_get_timecount_safe(struct timecounter *tc)
    > {
    > unsigned u1, u2, u3;
    >
    > u2 = read_counter();
    > u3 = read_counter();
    > do {
    > u1 = u2;
    > u2 = u3;
    > u3 = read_counter();
    > } while (u1 > u2 || u2 > u3 || (u3 - u1) > 15);
    > return (u2);
    > }
    >
    > Petri Helenius wrote:
    >
    > > 5.x defaults to ACPI or TSC timers. So your wish has been transported
    > > by a timemachine into the past.
    > >
    > > With 4.x you have to set it manually.
    > >
    > > Pete
    > >
    > > ----- Original Message -----
    > > From: "Steven Hartland" <killing@barrysworld.com>
    > > To: "Petri Helenius" <pete@he.iki.fi>; "Jin Guojun [DSD]" <j_guojun@lbl.gov>; <freebsd-performance@freebsd.org>
    > > Sent: Thursday, July 17, 2003 12:57 AM
    > > Subject: Re: timer counter chip access mystery]
    > >
    > > > If this could be changed / fixed it would have a marked performance increase
    > > > for all game server code which use this function heavily from what I've seen
    > > > and would explain the sometimes huge performance differential between
    > > > FreeBSD and Linux.
    > > >
    > > > Steve / K
    > > > ----- Original Message -----
    > > > From: "Petri Helenius" <pete@he.iki.fi>
    > > > To: "Jin Guojun [DSD]" <j_guojun@lbl.gov>; <freebsd-performance@freebsd.org>
    > > > Sent: Wednesday, July 16, 2003 10:44 PM
    > > > Subject: Re: timer counter chip access mystery]
    > > >
    > > >
    > > > >
    > > > > This access happens over ISA bus and thus happens at the speed the bus
    > > > > operates at. Use TSC or ACPI for faster gettimeofday.
    > > > >
    > > > > Pete
    >
    >

    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"


  • Next message: James West: "Re: Major problem with "No buffer space available" errors"

    Relevant Pages

    • Re: PcLinux
      ... Pete C. wrote: ... and the second is the total absurdity of this little gem: ... As to the generic hardware platform, trust me, it's coming. ... As for the cell phone, I respectfully suggest that you should probably ...
      (rec.crafts.metalworking)
    • Re: How difficult is it to clone a HD?
      ... pete wrote: ... with a serious crime they are investigating. ... but I would not mind the cops cloning my HD and releasing my property. ... return of your hardware with a cloned HD. ...
      (uk.legal)
    • Re: Windows XP startup problem
      ... > Attempts to boot to safe mode does not work it hangs as Pete ... The Stop Error would be useful because then you could troubleshoot it ... I'd run some hardware diagnostics starting with a RAM ... test and including a hard drive test and if all the hardware looks ...
      (microsoft.public.windowsxp.general)
    • Re: [Fwd: The modem chicken and egg question? Newbie Alert!]
      ... "J Simpson V21" wrote: ... >> Is the com port availble? ... >> Pete Nesbitt, rhce ... The Motorola SM56 seems to be a 'softmodem', not a true hardware ...
      (RedHat)
    • Re: Core Duo
      ... Pete wrote: ... Debian runs well on my old ... but it is old hardware. ... ACPI don't always work well, there are special projects for Asus and Sony ...
      (alt.linux)