All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Nicolodi <daniele@domain.hid>
To: Alexis Berlemont <berlemont.hauw@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Analogy: cancel ongoing commands when a device is closed
Date: Mon, 29 Mar 2010 20:40:40 +0200	[thread overview]
Message-ID: <4BB0F428.5050905@domain.hid> (raw)
In-Reply-To: <4BA2BFCF.8010000@domain.hid>

Alexis Berlemont wrote:
> Daniele Nicolodi wrote:
>> After fixing analogy to permit continuous acquisition, I discovered that
>> ongoing commands are not canceled when a device is closed (I obtain a
>> DMA buffer owerwrite warning in the kernel log when I abruptly terminate
>>  my acquisition program).
>>
>> I think this is quite a surprising behavior. I would expect that the
>> commands are canceled when there isn't a data consumer any more. Would
>> it be possible to cancel any ongoing command on device close? If there
>> is agreement on this, I can look into providing a patch.
>>
> The close should indeed stop any occurring acquisition. I implemented
> this behaviour. It is in my git repository.

Hi Alexis. I have been working with analogy from your git three and I
should say that the new behavior, in my use case, is worst than the
previous.

Now, when a device is closed, all accurring acquisition are terminated,
also the ones that haven't been started by the current process. While it
is possible to use at the same time two different subdevices, from two
different processes, now it is not possible to terminate one process and
leave the other one running. I think that the correct behavior would be
to terminate just the acquisitions started by the current process.
However, I have no idea on how difficult this would be.

This bring me also to the fact that there isn't currently a way to
prevent two concurrent processes to access the same subdevice,
interfering each other. Would it possible to have a lock() method, as
comedi has?

Thanks. Cheers,
-- 
Daniele


  reply	other threads:[~2010-03-29 18:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 16:50 [Xenomai-core] Analogy: cancel ongoing commands when a device is closed Daniele Nicolodi
2010-03-19  0:05 ` Alexis Berlemont
2010-03-29 18:40   ` Daniele Nicolodi [this message]
2010-04-05 21:54     ` Alexis Berlemont
2010-04-23 20:39       ` [Xenomai-core] Analogy: cmd_bits Stefan Schaal
2010-04-24 22:20         ` Alexis Berlemont
2010-06-24 23:04       ` [Xenomai-core] Analogy: cancel ongoing commands when a device is closed Alexis Berlemont

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=4BB0F428.5050905@domain.hid \
    --to=daniele@domain.hid \
    --cc=berlemont.hauw@domain.hid \
    --cc=xenomai@xenomai.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.