Re: [PATCH] get_nodes mask miscalculation

From: Andi Kleen (ak_at_muc.de)
Date: 08/10/04

  • Next message: Martin Mares: "Re: PATCH: cdrecord: avoiding scsi device numbering for ide devices"
    Date:	10 Aug 2004 17:34:56 +0200
    Date:	Tue, 10 Aug 2004 17:34:56 +0200
    To: Brent Casavant <bcasavan@sgi.com>
    
    

    On Tue, Aug 10, 2004 at 09:54:08AM -0500, Brent Casavant wrote:
    > On Tue, 10 Aug 2004, Andi Kleen wrote:
    >
    > > The idea behind this is was to make it behave like select.
    > > And select passes highest valid value + 1.
    >
    > Not that my opinion is worth much, but this seems a very peculiar
    > interface to mimic.

    It is the only system call I am aware of that passes a variable
    length bitmap. Do you know of any others?

    > > nodemask."
    >
    > Actually, I worked from the following description:
    >
    > mbind(3)
    > . . .
    > nodemask is a bit field of nodes that contains up to
    > maxnode bits.
    > . . .
    >
    > This very clearly indicates that I should pass the number of bits
    > in the nodemask field, not the number of bits plus one.

    I really need to rewrite the mbind manpage - it was a quick
    hack job and has several other errors.

    > > Problem is that you'll break all existing libnuma binaries
    > > which pass NUMA_MAX_NODES + 1. In your scheme the kernel
    > > will access one bit beyond the bitmap that got passed,
    > > and depending on its random value you may get a failure or not.
    >
    > Well, again, not that my opinion carries much weight (nor really should
    > it), but this whole off-by-one (or two) interface seems unnecessarily
    > confusing. Is there no way we can get this fixed? The temporary pain

    Sure, new system call slots would do with a small compat wrapper
    for the old calls. I'm just not sure it is worth it. I personally
    don't find it that confusing, but I'm probably not a good benchmark
    for this.

    > of breaking the relatively new libnuma seems worth the price of getting
    > this forever cleaned up.

    I don't think breaking existing binaries is a good idea. Linux
    has higher standards.

    -Andi
    -
    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/


  • Next message: Martin Mares: "Re: PATCH: cdrecord: avoiding scsi device numbering for ide devices"

    Relevant Pages

    • Re: [PATCH] get_nodes mask miscalculation
      ... Not that my opinion is worth much, but this seems a very peculiar ... And not to make things even more confusing, ... Well, again, not that my opinion carries much weight (nor really should ... but this whole off-by-one interface seems unnecessarily ...
      (Linux-Kernel)
    • Re: One-Legged Taliban Commander Puts Grenade in Ass: BOOM!
      ... What a laugh, I wasn't offended nor did I complain - that was you after you ... have offered not one iota of factual arguement worth spit. ... It's your opinion that I have no business commenting on military ... It's also not worth American blood in your opinion. ...
      (alt.politics)
    • Re: Threatening with a Toothpick
      ... suffer the same uninformed foot in mouth disease that afflicts Senator ... I'm trying to find out what you base your opinion on, ... I respectfully decline your invitation and invite you to disprove it if you ... think it'd be more worth your while than I think it'd be worth mine. ...
      (soc.retirement)
    • Re: Feiglin: "I will rebuild the Temple."
      ... I routinely will NOT click on a link in a post if the OP didn't deem it ... worth their effort to so comment. ... Only if somebody summarizes it? ... Nothing here necessarily reflects the opinion of Hebrew University ...
      (soc.culture.jewish.moderated)
    • Re: The Sad, Sad Legacy of UPN & WB
      ... WB shows that were of any kind of worth or appeal ... why should anyone find your opinion "...about which shows worked ... I don't watch "boring or sickening" shows. ...
      (rec.arts.tv)