2013-04-05 22:02:00

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote:
>
> need break when 'target_thread' get value, firstly.
>
> 'tmp' is a stack (thread->transaction_stack),
> if 'proc' was the same between child node and parent node,
> the child would have higher priority than parent.

Are you sure about this?

have you tested it?

greg k-h


2013-04-05 23:48:08

by Arve Hjønnevåg

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On Fri, Apr 5, 2013 at 3:01 PM, Greg KH <[email protected]> wrote:
> On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote:
>>
>> need break when 'target_thread' get value, firstly.
>>
>> 'tmp' is a stack (thread->transaction_stack),
>> if 'proc' was the same between child node and parent node,
>> the child would have higher priority than parent.
>
> Are you sure about this?
>
> have you tested it?
>

Theoretically this should not change the behavior. The purpose of this
code it to make sure only thread per process is part of a transaction
stack, so if it finds more than one transaction with a matching
process, they should all point to the same thread object. I think a
better change description is needed though.

--
Arve Hj?nnev?g

2013-04-06 05:06:30

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On 2013年04月06日 07:48, Arve Hjønnevåg wrote:
> On Fri, Apr 5, 2013 at 3:01 PM, Greg KH <[email protected]> wrote:
>> > On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote:
>>> >>
>>> >> need break when 'target_thread' get value, firstly.
>>> >>
>>> >> 'tmp' is a stack (thread->transaction_stack),
>>> >> if 'proc' was the same between child node and parent node,
>>> >> the child would have higher priority than parent.
>> >
>> > Are you sure about this?
>> >
>> > have you tested it?
>> >
> Theoretically this should not change the behavior. The purpose of this
> code it to make sure only thread per process is part of a transaction
> stack, so if it finds more than one transaction with a matching
> process, they should all point to the same thread object. I think a
> better change description is needed though.


ok, thanks.
I will send patch v2 (also mark you as Signed-off).
(if the patch v2 still need improvement, please reply in time).


thanks.

:-)

--
Chen Gang

Asianux Corporation

2013-04-06 05:13:38

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On 2013??04??06?? 06:01, Greg KH wrote:
> On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote:
>>
>> need break when 'target_thread' get value, firstly.
>>
>> 'tmp' is a stack (thread->transaction_stack),
>> if 'proc' was the same between child node and parent node,
>> the child would have higher priority than parent.
>
> Are you sure about this?
>
> have you tested it?
>
> greg k-h
>
>

excuse me, I have not tested it.

I find it only by reading code.
I want to discuss it with related members.
(although I use [PATCH] title instead of [Suggestion] title)

if what I have done is not quite suitable, please provide suggestions.

thanks.

--
Chen Gang

Asianux Corporation

2013-04-06 05:44:11

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On 2013年04月06日 13:05, Chen Gang wrote:
> On 2013年04月06日 07:48, Arve Hjønnevåg wrote:
>> Theoretically this should not change the behavior. The purpose of this
>> code it to make sure only thread per process is part of a transaction
>> stack, so if it finds more than one transaction with a matching
>> process, they should all point to the same thread object. I think a
>> better change description is needed though.
>

oh, sorry, I forgot to be sure one thing before send patch v2.
(the reason maybe is my English is not quite well)

I guess what your meaning is:
in this condition:
one thread is related with one process.
also one process is related with one thread.

is it correct ?

thanks.

>
> ok, thanks.
> I will send patch v2 (also mark you as Signed-off).
> (if the patch v2 still need improvement, please reply in time).
>
>
> thanks.
>
> :-)
>


--
Chen Gang

Asianux Corporation

2013-04-06 05:57:56

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On Sat, Apr 06, 2013 at 01:05:59PM +0800, Chen Gang wrote:
> On 2013年04月06日 07:48, Arve Hjønnevåg wrote:
> > On Fri, Apr 5, 2013 at 3:01 PM, Greg KH <[email protected]> wrote:
> >> > On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote:
> >>> >>
> >>> >> need break when 'target_thread' get value, firstly.
> >>> >>
> >>> >> 'tmp' is a stack (thread->transaction_stack),
> >>> >> if 'proc' was the same between child node and parent node,
> >>> >> the child would have higher priority than parent.
> >> >
> >> > Are you sure about this?
> >> >
> >> > have you tested it?
> >> >
> > Theoretically this should not change the behavior. The purpose of this
> > code it to make sure only thread per process is part of a transaction
> > stack, so if it finds more than one transaction with a matching
> > process, they should all point to the same thread object. I think a
> > better change description is needed though.
>
>
> ok, thanks.
> I will send patch v2 (also mark you as Signed-off).

You can NEVER add someone else's "Signed-off-by", unless they actually
do it (hint, that did not happen here at all.)

Please go read Documentation/SubmittingPatches again to learn exactly
what Signed-off-by: really is (a legal agreement), it is not something
to throw around lightly like this.

> (if the patch v2 still need improvement, please reply in time).

In time for what?

Please test these patches before you resend them.

greg k-h

2013-04-06 07:29:16

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On 2013年04月06日 13:57, Greg KH wrote:
> On Sat, Apr 06, 2013 at 01:05:59PM +0800, Chen Gang wrote:
>> > On 2013年04月06日 07:48, Arve Hjønnevåg wrote:
>>> > > On Fri, Apr 5, 2013 at 3:01 PM, Greg KH <[email protected]> wrote:
>>>>> > >> > On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote:
>>>>>>> > >>> >>
>>>>>>> > >>> >> need break when 'target_thread' get value, firstly.
>>>>>>> > >>> >>
>>>>>>> > >>> >> 'tmp' is a stack (thread->transaction_stack),
>>>>>>> > >>> >> if 'proc' was the same between child node and parent node,
>>>>>>> > >>> >> the child would have higher priority than parent.
>>>>> > >> >
>>>>> > >> > Are you sure about this?
>>>>> > >> >
>>>>> > >> > have you tested it?
>>>>> > >> >
>>> > > Theoretically this should not change the behavior. The purpose of this
>>> > > code it to make sure only thread per process is part of a transaction
>>> > > stack, so if it finds more than one transaction with a matching
>>> > > process, they should all point to the same thread object. I think a
>>> > > better change description is needed though.
>> >
>> >
>> > ok, thanks.
>> > I will send patch v2 (also mark you as Signed-off).
> You can NEVER add someone else's "Signed-off-by", unless they actually
> do it (hint, that did not happen here at all.)
>
> Please go read Documentation/SubmittingPatches again to learn exactly
> what Signed-off-by: really is (a legal agreement), it is not something
> to throw around lightly like this.
>
>> > (if the patch v2 still need improvement, please reply in time).
> In time for what?
>

ok, thanks.


> Please test these patches before you resend them.
>

ok, thanks, I will try to find ways to test it.


> greg k-h
>
>


--
Chen Gang

Asianux Corporation

2013-04-06 09:47:55

by Chen Gang

[permalink] [raw]
Subject: Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

On 2013年04月06日 07:48, � wrote:
> Theoretically this should not change the behavior. The purpose of this
> code it to make sure only thread per process is part of a transaction
> stack, so if it finds more than one transaction with a matching
> process, they should all point to the same thread object. I think a
> better change description is needed though.

after reading code again, I think:
in our condition, one proc can be related with multiple threads.

can you provide more information for:
why can we be sure "they should all point to the same thread object" ?

result:
if it is an issue (can not be sure all point to the same thread object)
it seems need additional considerations for it.
what my fix seems incorrect, either.
(for its transaction processing, it seems not should obey stack rules).

else (can be sure)
my patch seems minor (only can increasing a little performance).
it is not quite suitable to spend much time to test a minor patch !!

so whether what will happen, my patch seems obsoleted !!

:-(


--
Chen Gang

Asianux Corporation