All of lore.kernel.org
 help / color / mirror / Atom feed
From: <ckim@etri.re.kr>
To: <kernelnewbies@kernelnewbies.org>
Subject: How to implement waiting until processing is done by a device..
Date: Fri, 20 Aug 2021 22:09:23 +0900	[thread overview]
Message-ID: <010e01d795c4$98cefe70$ca6cfb50$@etri.re.kr> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1063 bytes --]

Hello,

We are developing a compute accelerator and I'm not sure which is the best
or normal way to implement the waiting method for the application until the
computing is finished by the accelerator.

The application first sets up input data and configuration for the
accelerator on the memory. It then calls an ioctl which sets up the
registers and it calls another ioctl which trigger the accelerator.

My idea is : 

*	The application process goes into wait queue after calling the
second ioctl by telling the OS "keep me in the wait queue and wake me up
when 'this' signal comes'. 
*	The driver's ISR process sends a signal to the sleeping user process
when processing the 'computing complete' interrupt.

Does this make sense? (Can I define and use a signal for this purpose?) 

And if it does, what function calls should I use? I would appreciate sending
me any link for suggested reading.

It should be possible to use accelerator for multiple processes at the same
time, but I think for now we can just do with single application.

Thanks!

Chan Kim

 


[-- Attachment #1.2: Type: text/html, Size: 6533 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

                 reply	other threads:[~2021-08-20 13:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='010e01d795c4$98cefe70$ca6cfb50$@etri.re.kr' \
    --to=ckim@etri.re.kr \
    --cc=kernelnewbies@kernelnewbies.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.