lkml.org 
[lkml]   [2007]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc 23/45] cpu alloc: dmaengine conversion
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-20 21:49    [W:0.071 / U:0.280 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site