git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Erik Faye-Lund <kusmabite@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: msysgit@googlegroups.com, Git Mailing List <git@vger.kernel.org>
Subject: Re: [msysGit] upload-pack timing issue on windows?
Date: Wed, 25 Aug 2010 19:40:40 +0200	[thread overview]
Message-ID: <AANLkTinboi+L3fvC___pULO0u_ZBNNOM6er+chxt7s07@mail.gmail.com> (raw)
In-Reply-To: <201008242124.23890.j6t@kdbg.org>

On Tue, Aug 24, 2010 at 9:24 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> On Montag, 23. August 2010, Erik Faye-Lund wrote:
>> - The culprit seems to be our poll-emulation. My understanding is that
>> poll() was called by create_pack_file() in upload-pack.c with nfds=1
>> (it's 2 until one of the fds are closed) when there's no data
>> available in the pipe. Since our poll() always returns POLLIN when
>> nfds=1, the check for xread(...) == 0 further down in
>> create_pack_file() cause the fd to be closed, leading to an error on
>> the client-side.
>> -  Just removing the nfds=1-hack works for me, but I'm suspecting the
>> nfds=1-hack is there for some socket-reason. So instead I've replaced
>> our poll-emulation with gnulib's in my branch (with a couple of
>> patches on top), and it seems to do the trick for me. I still haven't
>> tested it heavily, though.
>
> The nfds == 1 hack is an "optimization": When only one channel must be
> observed, then we can let (x)read() wait for data instead of doing it inside
> poll() in some way.
>

OK, thanks for the clarification. Unfortunately, this optimization
breaks down in some cases (like the one I described).

> I'm not happy with our poll emulation because it contains a busy-loop.
> Gnulib's version looks quite capable, but I haven't studied it in detail.
> Until then, I trust that it does the right thing.
>

Well, I've found (and supplied patches for) a couple of bugs in it,
but apart from that it seems quite sane. So yeah, I think it might be
the best way forward.

But I'm curious, what's the best way of import a couple of foreign
source files, while maintaining a couple of patches on top of them?
I'm thinking that perhaps a import-commit followed by the patches
would make it easier to merge in changes than to just import the
patched version, but I'm not entirely sure how to do such a merge
without merging a full subtree...

  reply	other threads:[~2010-08-25 17:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 23:51 upload-pack timing issue on windows? Erik Faye-Lund
2010-02-06 10:06 ` Johannes Sixt
2010-02-06 12:01   ` [msysGit] " Erik Faye-Lund
2010-02-06 22:18     ` Johannes Sixt
2010-02-08 11:18       ` Erik Faye-Lund
2010-02-10 20:41         ` Jay Soffian
2010-08-22 23:27         ` Erik Faye-Lund
2010-08-24 19:24           ` Johannes Sixt
2010-08-25 17:40             ` Erik Faye-Lund [this message]
2010-08-25 20:53               ` Johannes Sixt
2010-08-25 20:57                 ` Erik Faye-Lund

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=AANLkTinboi+L3fvC___pULO0u_ZBNNOM6er+chxt7s07@mail.gmail.com \
    --to=kusmabite@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=msysgit@googlegroups.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).