All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW daemons/clvmd/clvmd-singlenode.c
Date: Mon, 29 Mar 2010 11:13:44 -0400	[thread overview]
Message-ID: <20100329151343.GA20880@redhat.com> (raw)
In-Reply-To: <871vf3b3cb.fsf@twilight.int.mornfall.net.>

On Mon, Mar 29 2010 at 10:38am -0400,
Petr Rockai <prockai@redhat.com> wrote:

> Hi!
> 
> snitzer at sourceware.org writes:
> > Modified files:
> > 	.              : WHATS_NEW 
> > 	daemons/clvmd  : clvmd-singlenode.c 
> >
> > Log message:
> > 	Use a real socket for singlenode clvmd to fix clvmd's high cpu load.
> Interesting. Is this because /dev/null is always "ready" for reading?

Yes, daemons/clvmd/clvmd.c:main_loop's select() on /dev/null appears to
be the problem.  If I set the associated listen_fd to be nonblocking the
CPU load goes from 100%+ to ~80%.  But with the committed "fix" cpu load
(when clvmd is idle) is now ~1% (on my f12 kvm guest).

> Is there a less complicated workaround for that problem?

I haven't looked for an alternative.  Not really seeing the current fix
as overly complicated.  Its pretty standard socket code, which Milan
started, that I then refined to be modeled after
daemons/clvmd/clvmd.c:open_local_sock().  For that matter, we could have
a single function that is used for both (reducing the perceived
complexity of the clvmd-singlenode.c:init_comms).

Mike



  reply	other threads:[~2010-03-29 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 15:45 LVM2 ./WHATS_NEW daemons/clvmd/clvmd-singlenode.c snitzer
2010-03-29 14:38 ` Petr Rockai
2010-03-29 15:13   ` Mike Snitzer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-08-04 12:13 zkabelac
2011-10-11  9:05 zkabelac
2012-04-24 12:16 zkabelac

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=20100329151343.GA20880@redhat.com \
    --to=snitzer@redhat.com \
    --cc=lvm-devel@redhat.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 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.