Re: [PATCH] 2.5.21 - list.h cleanup

From: Martin Dalecki (
Date: Tue Jun 11 2002 - 04:04:16 EST

> And while I'd like to avoid #include hell, I'm not willing to replace
> inline functions with #define's to avoid it ;^p

A more real example from blk.h:

extern inline struct request *elv_next_request(request_queue_t *q)
        struct request *rq;

        while ((rq = __elv_next_request(q))) {
                rq->flags |= REQ_STARTED;

                if (&rq->queuelist == q->last_merge)
                        q->last_merge = NULL;

                if ((rq->flags & REQ_DONTPREP) || !q->prep_rq_fn)

                 * all ok, break and return it
                if (!q->prep_rq_fn(q, rq))

                 * prep said no-go, kill it
                if (end_that_request_first(rq, 0, rq->nr_sectors))


        return rq;

The only thing this achvies is kernel bload, since
elv_next_request is:

1. Calling tons of functions, which could be inlined as well.

2. Not precisely on any ultra fast path.

3. Bound by the device speed.

4. Increasing the pressure on branch prediction due
to the while construct.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:21 EST