Re: [PATCH RFC] Let pseudo->users loop on duplicate version of list

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

 



Hi Chris,

On 12 July 2017 at 18:03, Christopher Li <sparse@xxxxxxxxxxx> wrote:
> On Wed, Jul 12, 2017 at 8:56 AM, Dibyendu Majumdar
> <mobile@xxxxxxxxxxxxxxx> wrote:
>>>
>>
>> Okay - but is your approach generic enough? What if there was a split
>> in the node that you copied? I don't have a full understanding but it
>> appears to be a very specific solution rather than a general one.
>
> You have a very good point. I have never thought about splitting the
> node. If split the node then there will be some ptr iterate twice. Because
> some node move to the next bucket and the dup node know nothing
> about it. It would be a problem for the existing code as well.
>
> My ptrlist ref count patch haven't check the split node situation.
> Even Luc's suggestion for "mark and sweep" to delete the ptrlist
> is not going to help with the nested loop split. I will add that check.
> I don't expect new offenders but let's make sure about it.
>

I did raise this before
(http://marc.info/?l=linux-sparse&m=149943353732715&w=2) but maybe it
got lost in the other stuff.

> It means it would be so much nicer if we can avoid nested loop modify at all.
>

I agree with that - traversing a list that is also being modified by
recursive code is pretty hard to get right.

>> I was just saying that you can use the standard /existing iterator
>> macros once you have duplicated the list.
>
> It was not mean to a temporary fix not generic. But may be just add
> a function for duplicate list is needed for long run.
>
> We try to avoid nest loop modify, if it has to be done. Outer loop
> use a duplicated list.
>

Personally I think that is a reasonable approach.

Regards
Dibyendu
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux