On Thu, 25 Oct 2007, Rusty Russell wrote:Nobody should *ever* walk the list to find the length. Does anybody really do that? Yes, we pass the thing down, but do people *need* it? [ Side note: some of the users of that length currently would seem to be buggy in the presense of continuation entries, and seem to assume that the "list" is just a contiguous array. In fatc, that's almost the only valid use for the "count" thing, since any other use _has_ to walk it entry by entry anyway, no? ] The thing is, nobody should care. You walk the list to fill things in, or to write it out to some HW-specific DMA table, you should never care about the length. However, you *do* care about the "where does it end" part: to be able to detect overflows (which should never happen, but from a debugging standpoint it needs to be detectable rather than just silently use or corrupt memory). But if people really want/need the length, then we damn well should have a "header" thing, not two independent "list + length" parameters. Linus -
| Heiko Carstens | [patch -mm] s390: struct bin_attribute changes |
| Andrew Morton | 2.6.25-rc2-mm1 |
| Eric W. Biederman | Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Andrew Morton | Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes |
