git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "阿德烈 via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, 阿德烈 <adlternative@gmail.com>
Subject: Re: [PATCH v2] alloc.h|c: migrate alloc_states to mem-pool
Date: Mon, 01 Feb 2021 09:56:32 -0800	[thread overview]
Message-ID: <xmqqpn1jn033.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <pull.857.v2.git.1612175966786.gitgitgadget@gmail.com> (=?utf-8?B?IumYv+W+t+eDiA==?= via GitGitGadget"'s message of "Mon, 01 Feb 2021 10:39:26 +0000")

"阿德烈 via GitGitGadget"  <gitgitgadget@gmail.com> writes:

> From: ZheNing Hu <adlternative@gmail.com>
>
> "alloc_state" may have similar effects with "mem_pool".

What "similar effects" do you have in mind?  "mem_pool" may have
more than one "effects" to multiple things that are affected, but it
is unclear which effect that "mem_pool" exerts on what you are
referring to.

> Using the new memory pool API may be more beneficial
> to our memory management in the future.

Many things may or may not be "beneficial" in the future.  We do not
build things on a vague "hunch".

Are you seeking performance (e.g.  number of objects that can be
allocated per minute)?  Are you seeking better memory locality
(e.g. related objects are likely to be stored in the same page,
reducing number of page faults)?  Are you seeking reduced wasted
memory (e.g. custom allocator packs objects better than bog-standard
malloc(3))?  Are you seeking functionality (e.g. you have this and
that specific codepaths and usecase where you wish to be able to
release all the objects instantiated for a particular repository,
without having to go through the list of all objects, and use of
mempool is one way to allow us do so)?

It is not even clear in your problem description what kind of
benefit you are seeking, let alone how much quantitative improvement
you are getting with this change.


  parent reply	other threads:[~2021-02-01 17:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 12:59 [PATCH] alloc.h|c: migrate alloc_states to mem-pool 阿德烈 via GitGitGadget
2021-02-01 10:39 ` [PATCH v2] " 阿德烈 via GitGitGadget
2021-02-01 17:55   ` René Scharfe
2021-02-02 13:12     ` 胡哲宁
2021-02-02 16:36       ` René Scharfe.
2021-02-01 17:56   ` Junio C Hamano [this message]
2021-02-02 13:06     ` 胡哲宁
2021-02-04 10:33   ` [PATCH v3] " 阿德烈 via GitGitGadget

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=xmqqpn1jn033.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=adlternative@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@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).