Linux NFS development
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: "Elias Näslund" <elias.naslund@kd.kongsberg.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: Writing to NFS interfere with other threads in the same process
Date: Tue, 24 Oct 2023 07:21:50 -0400	[thread overview]
Message-ID: <FCF5E1D2-5DFD-4AA6-9BCF-7C902FFCCC80@redhat.com> (raw)
In-Reply-To: <PRAP190MB1833A3FAB75002DD5467B8ABCBDFA@PRAP190MB1833.EURP190.PROD.OUTLOOK.COM>

On 24 Oct 2023, at 1:20, Elias Näslund wrote:

> In an embedded application we're running a Yocto based linux distrubution with RT patches. One thread is writing data to a file on a NFS and another thread is once every second running chronyc tracking with popen.
> The hardware is a dual core ARM with 1 gb of memory.
>
> The problem is that chronyc tracking doesn't return within 100 ms if both threads runs in the same application. If, however, each thread runs in its own process it works as expected. It takes normally 10-20ms for chronyc tracking to return.

The write_file() thread is queuing up a lot of async IO that is then
flushed by chronyc's do_exit -> put_files_struct -> filp_close, which will
be a synchronous wait for all that IO.

If that's not what you want I think you'll want to figure out how to drop
CLONE_FILES from std::thread's clone(2) syscall.

Ben


  reply	other threads:[~2023-10-24 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24  5:20 Writing to NFS interfere with other threads in the same process Elias Näslund
2023-10-24 11:21 ` Benjamin Coddington [this message]
2023-10-25  8:54   ` Elias Näslund

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=FCF5E1D2-5DFD-4AA6-9BCF-7C902FFCCC80@redhat.com \
    --to=bcodding@redhat.com \
    --cc=elias.naslund@kd.kongsberg.com \
    --cc=linux-nfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox