On Tue, 20 Nov 2007, Mathieu Desnoyers wrote:
> > @@ -488,11 +487,8 @@ dma_async_memcpy_buf_to_buf(struct dma_c
> > tx->tx_set_dest(addr, tx, 0);
> > cookie = tx->tx_submit(tx);
> >
> > - cpu = get_cpu();
> > - per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
> > - per_cpu_ptr(chan->local, cpu)->memcpy_count++;
> > - put_cpu();
> > -
> > + __CPU_ADD(chan->local->bytes_transferred, len);
> > + __CPU_INC(chan->local->memcpy_count);
>
> I am wondering about the impact of the preempt disable removal here. It
> means that there is a statistically low probability that we will be
> moved to a different CPU between the bytes_transferred and the
> memcpy_count increments. I hope nobody relies on the fact that the
> per-cpu counts should match perfectly...
True. But as far as I can tell this is just statistics and technically the
operation is not complete until this function has terminated. So one half
was run on one and one half on the other. Where the statistics should be
kept is ambiguous.
Having said that: We could leave the code unchanged if this is a concern.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]