Messages in this thread | | | From | (Linus Torvalds) | Subject | Re: [PATCH] Decrease hash table memory overhead | Date | 1 Aug 2000 10:21:46 -0700 |
| |
In article <Pine.LNX.4.21.0008011530400.997-300000@saturn.homenet>, Tigran Aivazian <tigran@veritas.com> wrote: > >On Tue, 1 Aug 2000, Mark Hemment wrote: >> I've attached a patch (against 2.4.0-test5) for the page cache, which >> [skip] > >Hi Mark, > >I have just tested your patch against 2.4.0-test6-pre1 and the results are >very nice - i.e. it significantly improves performance. I used two >different tests and they both speak in one voice to your favour:
The performance improvement looks interesting, but I would rather see this use the scheme that we _are_ using in some other places, namely just doing version counts. They are, in my opinion, much simpler conceptually, and can be validly used for many different data structures. The cookie approach only works for some well-behaved stuff (ie "always insert at the head" - which is obviously true in this case, but the point being that the versioning approach works across a wide variety of problems)
Cookies also tend to require that we make sure that the cookie is fully initialized etc, so that nobody else uses that cookie by mistake for anything.
That said, cookies can perform better than versioning (versioning can cause unnecessary searches when there are multiple concurrent users etc, as they "fight" over the version number), so I wouldn't be entirely adverse to them. It probably depends on the exact use, and how clean/ugly the code ends up looking..
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |