Re: [PATCH 14/25] aio: Make aio_read_evt() more efficient

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> We can't use cmpxchg() on the ring buffer's head pointer directly, since
> it's modded to nr_events and would be susceptible to ABA. So instead we
> maintain a shadow head that uses the full 32 bits, and cmpxchg() that
> and then updated the real head pointer.

Time to update this comment to reflect the mutex instead of the shadow
head? :)

> +		ev = kmap(page);
> +		copy_ret = copy_to_user(event + ret, ev + pos, sizeof(*ev) * i);
> +		kunmap(page);

For lack of a better time: do we want to bring up the missing
flush_dcache_page() calls around the kernel mappings of ring pages that
are also mapped to user addresses?

>  		prepare_to_wait_exclusive(&ctx->wait, &wait,
>  					  TASK_INTERRUPTIBLE);
>  
> +		ret = aio_read_events(ctx, event + i, nr - i);
> +		if (ret < 0)
>  			break;

As mentioned offlist: we don't want to be blocking under
TASK_INTERRUPTIBLE.  Is the plan to do a non-blocking check and pop
outside the wait loop to do a blocking copy?

- z
--
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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux