From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA9FEC4338F for ; Fri, 20 Aug 2021 13:09:56 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C776461053 for ; Fri, 20 Aug 2021 13:09:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C776461053 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mH4H8-0006ia-7T; Fri, 20 Aug 2021 09:09:34 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (Exim 4.94.2) (envelope-from ) id 1mH4H5-0006hk-5O for kernelnewbies@kernelnewbies.org; Fri, 20 Aug 2021 09:09:32 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 20 Aug 2021 22:09:25 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.112] (HELO smtp002-imp.gov-dooray.com) ([10.162.225.112]) by send002-relay.gov-dooray.com with SMTP id 5dcecfbe611fa985; Fri, 20 Aug 2021 22:09:25 +0900 DKIM-Signature: a=rsa-sha256; b=pZ4rxKYSQlCX43Y87xfCq8u/osm4UHTtxMbwOBXdm/w5LTOAHgoyyNnqHK4GAbEswC/W+NyBRh 7ucBP+7tVgv9QNXXYHLcv7syna7zP/cqExAppT7z+7ONKuBCytm0SA7zqvvD64kxoY0Yom9jOV+P AHhsUaThz5uPllspPixZBjqoUESvRrq/TZ6h7qZZevQijt/Do06c5mSTCMSy9BcPnwehaahls2Lq GtjjgZiUOXdkr03DYwtYMr6mjS17v3Ed7bkhlJa0VTo5saMrnzziFnIG8cLQKrkRY31Mv5mYLTkD 8y1mQ6azqSUaca6pAsOAEuc6FpWNdZiiduN19HrA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=0v7PVqo/8kLXuz7tqNrRcZp1OAfnw986fNJax1ap5wY=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp002-imp.gov-dooray.com with SMTP id 04b8e5be611fa985; Fri, 20 Aug 2021 22:09:25 +0900 From: To: Subject: How to implement waiting until processing is done by a device.. Date: Fri, 20 Aug 2021 22:09:23 +0900 Message-ID: <010e01d795c4$98cefe70$ca6cfb50$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdeVxJDB9C/VLOkuSRugaPuFgg7L2A== Content-Language: ko X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6647337315410015289==" Errors-To: kernelnewbies-bounces@kernelnewbies.org This is a multipart message in MIME format. --===============6647337315410015289== Content-Type: multipart/alternative; boundary="----=_NextPart_000_010F_01D79610.08B80600" Content-Language: ko This is a multipart message in MIME format. ------=_NextPart_000_010F_01D79610.08B80600 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_010F_01D79610.08B80600 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

------=_NextPart_000_010F_01D79610.08B80600-- --===============6647337315410015289== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6647337315410015289==--