git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC] thread-utils: better wrapper to avoid #ifdef NO_PTHREADS

From
Jeff King <peff@peff.net>
Date
Oct 27, 2018, 08:17 UTC
Message-ID
<20181027081724.GH26685@sigill.intra.peff.net>
In-Reply-To
<CACsJy8D8a-0R=J6nCPwBAypYF=rejgT-3QFnuK1h3vMcJGG7_A@mail.gmail.com>
On Sat, Oct 27, 2018 at 09:26:28AM +0200, Duy Nguyen wrote:
Show 12 quoted lines
> On Fri, Oct 26, 2018 at 4:09 PM Ben Peart <peartben@gmail.com> wrote:
> > I agree though I'm still curious if there are still no-threaded
> > platforms taking new versions of git.  Perhaps we should do the
> > depreciation warning you suggested elsewhere and see how much push back
> > we get.  It's unlikely we'd get lucky and be able to stop supporting
> > them completely but it's worth asking!
> 
> NO_PTHREADS can also be used even though the platform supports
> multithread: to make keep git execution in a single core/thread. It
> might matter on hosted systems with limited cpu power and you don't
> want git to hog it all. Yes it can also be achieved by setting a
> zillion config keys to "1", this way is just simpler.

Yeah, I wondered about that use case (also with your patches, and whether they might run into problems on systems that _do_ have pthreads, but just don't want to compile with them).

But I think that is pretty easily solved by just having a single runtime option (e.g., to just pretend that oneline_cpus is always 1 by default).

-Peff
Previous: Duy NguyenNext: Ramsay Jones
Message 11 of 13 in “config.mak.dev: enable -Wunused-function”
  1. config.mak.dev: enable -Wunused-functionJeff King, Oct 18, 2018
  2. Jeff KingOct 18, 2018
  3. Duy NguyenOct 18, 2018
  4. Jeff KingOct 18, 2018
  5. thread-utils: better wrapper to avoid #ifdef NO_PTHREADSNguyễn Thái Ngọc Duy, Oct 18, 2018
  6. Jeff KingOct 23, 2018
  7. Junio C HamanoOct 24, 2018
  8. Ben PeartOct 26, 2018
  9. can we deprecate NO_PTHREADS?, was: better wrapper to avoid #ifdef NO_PTHREADSJeff King, Oct 27, 2018
  10. Duy NguyenOct 27, 2018
  11. Jeff KingOct 27, 2018
  12. Ramsay JonesOct 18, 2018
  13. Junio C HamanoOct 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.