On Thu, Jul 2, 2015 at 11:40 AM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > All they are used for is matching response to request. Basically, you > can have up to 65535 pending requests. Reusing it right after getting > the response is fine. Reusing a tag right after getting the completion may be fine in theory, but it still sounds like a bad idea. Sure, it's used to match the command with the reply, but using those kinds of things for matching re-sends and to index into various "current data structures" is also very common (not having looked at p9 I don't know how much it does), and basically reusing tags "soon" tends to make those kidns of things fragile. Which can easily turn a "this _should_ work" into "it doesn't _actually_ work" just because it ends up making things like race conditions and re-ordering of replies trigger worse behavior. For example, things like "done with previous command X" and "now starting new command X" - if the tag is the same and those *independent* messages get re-ordered, the tag just failed in what it was supposed to do. So circular allocators are likely a good idea even if there are other layers that should handle retransmits etc. So it does sound like it would be better to use a circular tag allocator rather than a "lowest tag first" allocator. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html