Re: [PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-04 Thread Peter Hurley
On 09/03/2014 01:56 PM, Greg Kroah-Hartman wrote: > On Wed, Sep 03, 2014 at 11:10:45AM -0400, Peter Hurley wrote: >> On 09/03/2014 08:19 AM, One Thousand Gnomes wrote: Ahh. Thanks for the insight, Alan. But set_bit() et. al. will generate an incredible amount of churn; what if I

Re: [PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-03 Thread Greg Kroah-Hartman
On Wed, Sep 03, 2014 at 11:10:45AM -0400, Peter Hurley wrote: > On 09/03/2014 08:19 AM, One Thousand Gnomes wrote: > >> Ahh. Thanks for the insight, Alan. > >> > >> But set_bit() et. al. will generate an incredible amount of churn; > >> what if I split the fields up to prevent false-sharing? > > >

Re: [PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-03 Thread Peter Hurley
On 09/03/2014 08:19 AM, One Thousand Gnomes wrote: >> Ahh. Thanks for the insight, Alan. >> >> But set_bit() et. al. will generate an incredible amount of churn; >> what if I split the fields up to prevent false-sharing? > > Do you feel lucky ;-) Hahaha :) > I'd rather set_bit and friends were

Re: [PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-03 Thread One Thousand Gnomes
> Ahh. Thanks for the insight, Alan. > > But set_bit() et. al. will generate an incredible amount of churn; > what if I split the fields up to prevent false-sharing? Do you feel lucky ;-) I'd rather set_bit and friends were used. They exist largely for this kind of reason and they also have atom

Re: [PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-03 Thread Peter Hurley
On 09/03/2014 06:58 AM, One Thousand Gnomes wrote: > On Tue, 2 Sep 2014 17:39:30 -0400 > Peter Hurley wrote: > >> The stopped, hw_stopped, flow_stopped and packet bits are smp-unsafe >> and interrupt-unsafe. For example, >> >> CPU 0 | CPU 1 >>

Re: [PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-03 Thread One Thousand Gnomes
On Tue, 2 Sep 2014 17:39:30 -0400 Peter Hurley wrote: > The stopped, hw_stopped, flow_stopped and packet bits are smp-unsafe > and interrupt-unsafe. For example, > > CPU 0 | CPU 1 > | > tty->flow_stopped = 1 | tty->hw_stopped = 0 >

[PATCH 21/26] tty: Convert tty_struct bitfield to bools

2014-09-02 Thread Peter Hurley
The stopped, hw_stopped, flow_stopped and packet bits are smp-unsafe and interrupt-unsafe. For example, CPU 0 | CPU 1 | tty->flow_stopped = 1 | tty->hw_stopped = 0 One of these updates will be corrupted, as the bitwise operation on the