All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
	Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	Anton Blanchard <anton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
	general-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	Jeff Squyres <jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Subject: Re: [ofa-general] Re: [GIT PULL] please pull ummunotify
Date: Mon, 12 Oct 2009 20:19:44 +0200	[thread overview]
Message-ID: <20091012181944.GF17138@elte.hu> (raw)
In-Reply-To: <20090930160232.GZ22310-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>


* Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:

> On Wed, Sep 30, 2009 at 11:44:56AM +0200, Ingo Molnar wrote:
> > > > OK.  It would be nice to tie into something more general, but I 
> > > > think I agree -- perf counters are missing the filtering and the "no 
> > > > lost events" that ummunotify does have. [...]
> > 
> > Performance events filtering is being worked on and now with the 
> > proper non-DoS limit you've added you can lose events too, dont you? 
> > So it's all a question of how much buffering to add - and with perf 
> > events too you can buffer arbitrary large amount of events.
> 
> No, the ummunotify does not loose events, that is the fundamental 
> difference between it and all tracing schemes.
> 
> Every call to ibv_reg_mr is paired with a call to ummunotify to create 
> a matching watcher. Both calls allocate some kernel memory, if one 
> fails the entire operation fails and userspace can do whatever it does 
> on memory allocation failure.

We already support signal notification for perf events, and we also 
support two modi of perf ring-buffer overflow notification. Adding a 
third one that sends a signal when events are lost would be in line with 
that.

This would allow you to have the OOM semantics of requesting a SIGBUS - 
or user-space could do other things: like print a warning in the app or 
ignore the event overflow.

Which are all interesting things to do. (If you do that you might want 
to add that to 'perf top' or 'perf record' as well.)

> After that point the scheme is perfectly lossless.

Well if it can OOM it's not lossless, obviously. You just define "event 
loss" to be equivalent to "Destruction of the universe." ;-)

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Pavel Machek <pavel@ucw.cz>, Roland Dreier <rdreier@cisco.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	general@lists.openfabrics.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, Jeff Squyres <jsquyres@cisco.com>
Subject: Re: [ofa-general] Re: [GIT PULL] please pull ummunotify
Date: Mon, 12 Oct 2009 20:19:44 +0200	[thread overview]
Message-ID: <20091012181944.GF17138@elte.hu> (raw)
In-Reply-To: <20090930160232.GZ22310@obsidianresearch.com>


* Jason Gunthorpe <jgunthorpe@obsidianresearch.com> wrote:

> On Wed, Sep 30, 2009 at 11:44:56AM +0200, Ingo Molnar wrote:
> > > > OK.  It would be nice to tie into something more general, but I 
> > > > think I agree -- perf counters are missing the filtering and the "no 
> > > > lost events" that ummunotify does have. [...]
> > 
> > Performance events filtering is being worked on and now with the 
> > proper non-DoS limit you've added you can lose events too, dont you? 
> > So it's all a question of how much buffering to add - and with perf 
> > events too you can buffer arbitrary large amount of events.
> 
> No, the ummunotify does not loose events, that is the fundamental 
> difference between it and all tracing schemes.
> 
> Every call to ibv_reg_mr is paired with a call to ummunotify to create 
> a matching watcher. Both calls allocate some kernel memory, if one 
> fails the entire operation fails and userspace can do whatever it does 
> on memory allocation failure.

We already support signal notification for perf events, and we also 
support two modi of perf ring-buffer overflow notification. Adding a 
third one that sends a signal when events are lost would be in line with 
that.

This would allow you to have the OOM semantics of requesting a SIGBUS - 
or user-space could do other things: like print a warning in the app or 
ignore the event overflow.

Which are all interesting things to do. (If you do that you might want 
to add that to 'perf top' or 'perf record' as well.)

> After that point the scheme is perfectly lossless.

Well if it can OOM it's not lossless, obviously. You just define "event 
loss" to be equivalent to "Destruction of the universe." ;-)

	Ingo

  parent reply	other threads:[~2009-10-12 18:19 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11  4:38 [GIT PULL] please pull ummunotify Roland Dreier
2009-09-11  4:38 ` Roland Dreier
2009-09-15 11:34 ` Pavel Machek
     [not found]   ` <20090915113434.GF1328-+ZI9xUNit7I@public.gmane.org>
2009-09-15 14:57     ` [ofa-general] " Roland Dreier
2009-09-15 14:57       ` Roland Dreier
     [not found]       ` <ada7hw0gsqz.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-28 20:49         ` Pavel Machek
2009-09-28 20:49           ` Pavel Machek
     [not found]           ` <20090928204923.GA1960-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-09-28 21:40             ` Jason Gunthorpe
2009-09-28 21:40               ` Jason Gunthorpe
     [not found] ` <aday6omhz9d.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-11  5:56   ` KOSAKI Motohiro
2009-09-11  5:56     ` KOSAKI Motohiro
2009-09-11  6:03     ` [ofa-general] " Roland Dreier
2009-09-11  6:03       ` Roland Dreier
     [not found]       ` <adatyzahvbm.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-11  6:11         ` KOSAKI Motohiro
2009-09-11  6:11           ` KOSAKI Motohiro
     [not found]           ` <20090911150552.DB68.A69D9226-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-09-11 16:42             ` Gleb Natapov
2009-09-11 16:42               ` Gleb Natapov
2009-09-11  6:15       ` Brice Goglin
     [not found]         ` <4AA9EAF7.5010401-MZpvjPyXg2s@public.gmane.org>
2009-09-11  6:21           ` KOSAKI Motohiro
2009-09-11  6:21             ` KOSAKI Motohiro
2009-09-11  6:22           ` Roland Dreier
2009-09-11  6:22             ` Roland Dreier
2009-09-11  6:40             ` [ofa-general] " Jason Gunthorpe
2009-09-11  6:40               ` Jason Gunthorpe
     [not found]               ` <20090911064019.GZ4973-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-09-11 16:58                 ` Roland Dreier
2009-09-11 16:58                   ` Roland Dreier
     [not found]                   ` <adaljklifkt.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-15  7:03                     ` KOSAKI Motohiro
2009-09-15  7:03                       ` KOSAKI Motohiro
2009-09-15  8:27                       ` Roland Dreier
2009-09-15  8:27                         ` Roland Dreier
2009-09-15 12:38                       ` Jeff Squyres
2009-09-15 12:38                         ` Jeff Squyres
2009-09-16 16:30   ` Roland Dreier
2009-09-16 16:30     ` Roland Dreier
2009-09-16 16:40     ` [ofa-general] " Linus Torvalds
2009-09-16 16:40       ` Linus Torvalds
2009-09-17 11:30   ` Peter Zijlstra
2009-09-17 11:30     ` Peter Zijlstra
2009-09-17 14:24     ` [ofa-general] " Roland Dreier
     [not found]       ` <adafxalejiq.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-17 14:32         ` Roland Dreier
2009-09-17 14:32           ` Roland Dreier
     [not found]           ` <adaab0tej5c.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-17 14:49             ` Peter Zijlstra
2009-09-17 14:49               ` Peter Zijlstra
2009-09-17 15:03               ` Roland Dreier
2009-09-17 15:03                 ` Roland Dreier
     [not found]                 ` <adazl8td35u.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-17 15:22                   ` Peter Zijlstra
2009-09-17 15:22                     ` Peter Zijlstra
2009-09-17 15:45                   ` Roland Dreier
2009-09-17 15:45                     ` Roland Dreier
     [not found]                     ` <adatyz1d17q.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-09-18 11:50                       ` Ingo Molnar
2009-09-18 11:50                         ` Ingo Molnar
2009-09-29 17:13                       ` Pavel Machek
2009-09-29 17:13                         ` Pavel Machek
     [not found]                         ` <20090929171332.GD14405-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-09-30  9:44                           ` Ingo Molnar
2009-09-30  9:44                             ` Ingo Molnar
     [not found]                             ` <20090930094456.GD24621-X9Un+BFzKDI@public.gmane.org>
2009-09-30 16:02                               ` Jason Gunthorpe
2009-09-30 16:02                                 ` Jason Gunthorpe
     [not found]                                 ` <20090930160232.GZ22310-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-10-12 18:19                                   ` Ingo Molnar [this message]
2009-10-12 18:19                                     ` Ingo Molnar
     [not found]                                     ` <20091012181944.GF17138-X9Un+BFzKDI@public.gmane.org>
2009-10-12 19:30                                       ` Jason Gunthorpe
2009-10-12 19:30                                         ` Jason Gunthorpe
2009-10-12 20:20                                         ` Ingo Molnar
     [not found]                                           ` <20091012202046.GA7648-X9Un+BFzKDI@public.gmane.org>
2009-10-13  4:05                                             ` Jason Gunthorpe
2009-10-13  4:05                                               ` Jason Gunthorpe
2009-10-13  6:40                                               ` Ingo Molnar
     [not found]                                                 ` <20091013064006.GC9470-X9Un+BFzKDI@public.gmane.org>
2009-10-13 16:27                                                   ` Jason Gunthorpe
2009-10-13 16:27                                                     ` Jason Gunthorpe
2009-10-13  5:43                                           ` Brice Goglin
     [not found]                                             ` <4AD41373.8010108-MZpvjPyXg2s@public.gmane.org>
2009-10-13  6:38                                               ` Ingo Molnar
2009-10-13  6:38                                                 ` Ingo Molnar
2009-09-30 17:06                               ` Roland Dreier
2009-09-30 17:06                                 ` Roland Dreier
2009-10-02 16:32                               ` Roland Dreier
2009-10-02 16:32                                 ` Roland Dreier
     [not found]                                 ` <ada3a61rc3j.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-10-02 20:45                                   ` Pavel Machek
2009-10-02 20:45                                     ` Pavel Machek
2009-10-07 22:34                                   ` Roland Dreier
2009-10-07 22:34                                     ` Roland Dreier
     [not found]                                     ` <ada3a5uq1dk.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-10-12 17:33                                       ` Peter Zijlstra
2009-10-12 17:33                                         ` Peter Zijlstra
2009-09-17 14:43         ` Peter Zijlstra
2009-09-17 14:43           ` Peter Zijlstra

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=20091012181944.GF17138@elte.hu \
    --to=mingo-x9un+bfzkdi@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=anton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=general-ZwoEplunGu1OwGhvXhtEPSCwEArCW2h5@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=pavel-+ZI9xUNit7I@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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 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.