Re: portfs and port_send_event

  • From: Frits Hoogland <frits.hoogland@xxxxxxxxx>
  • To: Noveljic Nenad <nenad.noveljic@xxxxxxxxxxxx>
  • Date: Sat, 14 Apr 2018 16:51:31 +0200

I am not familiar with these functions.
It seems this port event framework is a solaris only thing, used as a 
substitute for semaphores, obviously because oracle thinks they have better 
performance or scale better. (actually they seem to say it’s mostly a 
substitute for polling event completion).
There are multiple blogposts explaining them, telling essentially that.

What is it that you need to know?
port_send_event seems to send something, the address is probably a pointer to a 
struct, and I am quite sure a foreground that has committed is the receiver of 
it, because that is what the function of sskgpwpost does. 
So that would be equivalent of semop on linux, posting the semaphore on which a 
foreground is sleeping, waiting for the logwriter to get notified the redo 
write has finished.

I don’t know the port event framework, but if you look at what happens when 
multiple processes need posting on a semaphore on linux, another function 
(sskgpwvectorpost) is executed and still all processes are posted serially, 
maybe the event framework can post them all at once. Again, I don’t know the 
port event framework, this might not be true, but this is the one of the 
problems that the port event framework is documented to solve.

And the database implemented a solution for this already, which is “polling 
mode”, which doesn’t require any communication from the logwriter to a waiting 
foreground after writing, because the foreground checks writing progress itself.

Frits Hoogland

http://fritshoogland.wordpress.com ;<http://fritshoogland.wordpress.com/>
frits.hoogland@xxxxxxxxx <mailto:frits.hoogland@xxxxxxxxx>
Mobile: +31 6 14180860

On 12 Apr 2018, at 10:39, Noveljic Nenad <nenad.noveljic@xxxxxxxxxxxx> wrote:

Is somebody familiar with the specification of Oracle Solaris kernel 
functions portfs and port_send_event?
 
These functions are a part of the Solaris Event Completion framework. This 
framework seems to be used instead of semaphores for posting messages between 
processes on the Solaris implementation of Oracle.
 
Here is an example of a call stack within the lgwr process:
 
port_send_event(FFFFA22B765EFBA8)
              libc.so.1`_portfs+0xa
              oracle`sskgpwpost+0xf0
              oracle`kslpsprns+0x19c
              oracle`kcrfw_slave_queue_insert+0x361
              oracle`kcrfw_redo_write_driver+0x73e
              oracle`ksbabs+0x15c4
              oracle`ksbrdp+0x4ce
              oracle`opirip+0x2cd
              oracle`opidrv+0x24a
              oracle`sou2o+0x64
              oracle`opimai_real+0x9f
              oracle`ssthrdmain+0x21d
              oracle`main+0x94
              oracle`0xabcb95b
 
While the other port_* functions are well documented (see 
https://docs.oracle.com/cd/E86824_01/html/E54766/port-send-3c.html#scrolltoc ;
<https://docs.oracle.com/cd/E86824_01/html/E54766/port-send-3c.html#scrolltoc>
 ) these two are completely missing despite being heavily used.
 
Best regards,
 
Nenad
 
http://nenadnoveljic.com/blog/ ;<http://nenadnoveljic.com/blog/>
 
 
____________________________________________________
Please consider the environment before printing this e-mail.
Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken.

Important Notice

This message is intended only for the individual named. It may contain 
confidential or privileged information. If you are not the named addressee 
you should in particular not disseminate, distribute, modify or copy this 
e-mail. Please notify the sender immediately by e-mail, if you have received 
this message by mistake and delete it from your system.

E-mail transmission may not be secure or error-free as information could be 
intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also 
processing of incoming e-mails cannot be guaranteed. All liability of the 
Vontobel Group and its affiliates for any damages resulting from e-mail use 
is excluded. You are advised that urgent and time sensitive messages should 
not be sent by e-mail and if verification is required please request a 
printed version.


Other related posts: