[PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC - Kernel

This is a discussion on [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC - Kernel ; On Sat, 26 Apr 2008, H. Peter Anvin wrote: > dean gaudet wrote: > > On Sat, 26 Apr 2008, H. Peter Anvin wrote: > > > > > dean gaudet wrote: > > > > i might be too ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 23 of 23

Thread: [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC

  1. Re: [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC

    On Sat, 26 Apr 2008, H. Peter Anvin wrote:

    > dean gaudet wrote:
    > > On Sat, 26 Apr 2008, H. Peter Anvin wrote:
    > >
    > > > dean gaudet wrote:
    > > > > i might be too late... but shouldn't these #defines be PR_SET_RDTSC and
    > > > > PR_GET_RDTSC or something like that?
    > > > >
    > > > > to me calling them PR_SET_TSC/PR_GET_TSC just seem like alternative ways
    > > > > to
    > > > > change/get the TSC (and could even reduce to portable TSC
    > > > > implementations...
    > > > > since such registers do exist on other architectures).
    > > > >
    > > > I would argue no, the flag is "is the TSC available". RDTSC is an
    > > > x86-specific name and would map poorly onto other architectures.

    > >
    > > yeah but "SET TSC" to me reads as "set the TSC".... i read nothing about
    > > making some instruction available or not.
    > >
    > > although clock_gettime/clock_settime could more natural APIs for such
    > > things.
    > >

    >
    > PR_SET/PR_GET are the common prefixes, though.


    that's not what's at issue... "PR_SET_TSC" reads "set the TSC" ... it
    doesn't read "set the ability to use the rdtsc instruction".
    PR_SET_RDTSC_ENABLE would seem to be more accurate... or even
    PR_SET_CR4_TSD which is what it really does

    -dean
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC

    From: "H. Peter Anvin"
    Date: Sat, 26 Apr 2008 17:37:17 -0700

    > dean gaudet wrote:
    > >>>
    > >> PR_SET/PR_GET are the common prefixes, though.

    > >
    > > that's not what's at issue... "PR_SET_TSC" reads "set the TSC" ... it
    > > doesn't read "set the ability to use the rdtsc instruction".
    > > PR_SET_RDTSC_ENABLE would seem to be more accurate... or even
    > > PR_SET_CR4_TSD which is what it really does
    > >

    >
    > The whole point I'm making is that any such name would inherently read
    > x86-specific.


    Agreed.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC

    dean gaudet wrote:
    >>>

    >> PR_SET/PR_GET are the common prefixes, though.

    >
    > that's not what's at issue... "PR_SET_TSC" reads "set the TSC" ... it
    > doesn't read "set the ability to use the rdtsc instruction".
    > PR_SET_RDTSC_ENABLE would seem to be more accurate... or even
    > PR_SET_CR4_TSD which is what it really does
    >


    The whole point I'm making is that any such name would inherently read
    x86-specific.

    -hpa
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2