All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sunitha Harish <sunithaharish04@gmail.com>
To: Milton Miller II <miltonm@us.ibm.com>
Cc: openbmc@lists.ozlabs.org, apparao.puli@linux.intel.com,
	edtanous@google.com
Subject: Re: pthreads at bmcweb
Date: Tue, 12 Jan 2021 14:18:53 +0530	[thread overview]
Message-ID: <f2ef1579-4850-5e72-9e22-ef2f6c07382f@gmail.com> (raw)
In-Reply-To: <OF03EE7F69.B8367FEE-ON00258655.00640A4B-00258655.00640A53@notes.na.collabserv.com>

Thanks Milton for sharing your views.

Awaiting more inputs/feedbacks from the community.

Regards,
Sunitha

On 06-01-2021 23:42, Milton Miller II wrote:
> On Jan 6, 2021 Sunitha Harish wrote:
>>      Hi team,
>>      Reference commit
>> https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/31735 :
>>      In order to handle the multiple push-style event subscribers,
>> bmc       needs to support the async resolution of the subscribers
>> address.       The async_resolve() API crashes if there is no thread
>> support in       the binary.
>>      I created a bmcweb binary patch by pulling this commit and
>> including the pthread. This works fine for the use-cases, but
>> increased the bmcweb binary size by 220KB.
> ?
>>      Ed's suggestion is not to use the pthreads, instead implement
>> alternatives to do the same job, so that the binary size is kept
>> minimum. He mentioned: "Considering that's a ~30% increase in binary
>> size to support one line off code, and most systems are already at
>> their binary size limit, no, that's not going to be acceptable. We
>> can either patch boost to use this
>> https://man7.org/linux/man-pages/man3/getaddrinfo_a.3.html or we
>> could build our own resolver type that calls that underneath.  This
>> was based on a quick lookthrough of solutions in Google.  I'm open to
>> other ideas here".
>>      I am looking for the community views about the increased bmcweb
>>      binary size v/s having a custom implementation for asyc_resolve.
>>       Please share your views & ideas to get to the best solution.
> I agree with Ed that adding pthreads is a step that should be taken
> with a lot of caution.   In addition to the binary size, a threaded
> application also adds security audit concerns.
>
> A quick search with the query of "dns lookup library embedded" found
> a possible library with a probably compatible license (although last
> update was 4 years ago), and the second link was a survey of other
> client and server packages that could be investigated.
>
> My personal opinion only.
>
> milton
>

  reply	other threads:[~2021-01-12  8:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  8:02 pthreads at bmcweb Sunitha Harish
2021-01-06 18:12 ` Milton Miller II
2021-01-12  8:48   ` Sunitha Harish [this message]
2021-01-12 13:05 ` Patrick Williams
2021-01-18  9:49   ` Sunitha Harish
2021-01-19 16:48 ` Ed Tanous

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=f2ef1579-4850-5e72-9e22-ef2f6c07382f@gmail.com \
    --to=sunithaharish04@gmail.com \
    --cc=apparao.puli@linux.intel.com \
    --cc=edtanous@google.com \
    --cc=miltonm@us.ibm.com \
    --cc=openbmc@lists.ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.