linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Huang\, Ying" <ying.huang@intel.com>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, <Oleksiy.Avramchenko@sony.com>
Subject: Re: [PATCH/RFC] llist: add llist_[add|del_first]_exclusive
Date: Thu, 28 Dec 2017 08:47:33 +0800	[thread overview]
Message-ID: <87h8sbsmoq.fsf@yhuang-dev.intel.com> (raw)
In-Reply-To: <CAMJBoFPYqHgPmu-_RoYN9HLwhDZrgX1XCEtmW6YbCsyb+ZboTA@mail.gmail.com> (Vitaly Wool's message of "Tue, 26 Dec 2017 11:23:25 +0100")

Vitaly Wool <vitalywool@gmail.com> writes:

> 2017-12-22 14:57 GMT+01:00 Huang, Ying <ying.huang@intel.com>:
>
>> Vitaly Wool <vitalywool@gmail.com> writes:
>>
>> > 2017-12-20 1:57 GMT+01:00 Huang, Ying <ying.huang@intel.com>:
>> >
>> > <snip>
>> >
>> >>
>> >> > Could you please elaborate how this would be implemented "on top"?
>> >>
>> >> struct llist_node *my_del_first_exclusive(struct llist_head *head)
>> >> {
>> >>         struct llist_node *node = llist_del_first(head);
>> >>
>> >>         if (node)
>> >>                 node->next = LLIST_NODE_UNLISTED;
>> >> }
>> >>
>> >> bool my_add_exclusive(struct llist_node *node, struct llist_head *head)
>> >> {
>> >>         if (node->next != LLIST_NODE_UNLIST)
>> >>                 return false;
>> >>         if (cmpxchg(&node->next, LLIST_NODE_UNLIST, NULL) !=
>> >>             LLIST_NODE_UNLIST)
>> >>                 return false;
>> >>         llist_add(node, head);
>> >>         return true;
>> >> }
>> >>
>> >
>> > That would work, thanks. I'll update the patch.
>>
>> Is there any other users except your code?  If no, I think it's better
>> to keep it with its only user instead part of llist library at least for
>> now.  Because I don't know whether the usage model is popular.
>>
>>
>>
> I'm going to come up with a patch to binder that uses these specific
> extensions, so I expect there'll be some users for this.

I think it is better to keep this in binder unless there are other
users.

Best Regards,
Huang, Ying

> Thanks,
>    Vitaly

      parent reply	other threads:[~2017-12-28  0:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 14:46 [PATCH/RFC] llist: add llist_[add|del_first]_exclusive Vitaly Wool
2017-12-19  1:35 ` Huang, Ying
     [not found]   ` <CAMJBoFOMpL4WarWU7txYiT7cVqRyrNLVqu-GOhEmjoNhPBQ=3w@mail.gmail.com>
2017-12-20  0:57     ` Huang, Ying
     [not found]       ` <CAMJBoFPt1xXxe5O9uvsLDufs4UHELk3DKPp=MjN5QUQJXUeQHg@mail.gmail.com>
2017-12-22 13:57         ` Huang, Ying
     [not found]           ` <CAMJBoFPYqHgPmu-_RoYN9HLwhDZrgX1XCEtmW6YbCsyb+ZboTA@mail.gmail.com>
2017-12-28  0:47             ` Huang, Ying [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h8sbsmoq.fsf@yhuang-dev.intel.com \
    --to=ying.huang@intel.com \
    --cc=Oleksiy.Avramchenko@sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vitalywool@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).