From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6755114272133480448 X-Received: by 2002:a92:6c12:: with SMTP id h18mr31195785ilc.6.1572893701823; Mon, 04 Nov 2019 10:55:01 -0800 (PST) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 2002:a5e:df41:: with SMTP id g1ls1292674ioq.13.gmail; Mon, 04 Nov 2019 10:55:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyFO4GxqSGhE3e1qWBjnQ/HhVOxNhf1aJfsSfdqBarXM7olZ7el21O8mMz0MPoWx3QWJvHi X-Received: by 2002:a6b:6f16:: with SMTP id k22mr10699237ioc.205.1572893700603; Mon, 04 Nov 2019 10:55:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572893700; cv=none; d=google.com; s=arc-20160816; b=nSiKREoLjHFSn3/IGJqMzkeoeESO6VOH5AlwxSzlK55aHpeW1nCKGZnuHAW1kwA01X ZuRjagRpNySe01m54ddyo1aP+p1MpaNL4Nm8R07D+/8v4ROQ3JMpgPLPs3Nw5gdx+fMK xvmrHQFKVXk4O4qwFMZdBhZYCAR+nBqXLBBz4dfxHRGkVTfnyd6SvzEOM/I2UnvcABCR aCxTgFLQ8hv6ML0k9M1bW6HZjeXpuiXwS52aeRi1ADylMMkH9HM2iBXiCmxsUbV8Knhi pp6GcNjNeYlOq0tMHdpfu2kkRXD8MdaDl3+a6QVawaCkQrn5giwLNtnzbYLHB94nJFeO sX4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=UGVnaFipR/GrB/6hfrr17vjy/wp7z4VWMiX515y8JUQ=; b=FkFDjZO2p85bvSpybbKpAHbnrzsJjxMLtdxDh40EzsVeHoFSgbO3QneocVdibWE+im F0YOwetKBeUlQawRsRHdFWfg7EaHq4WhGbS3Lt/PHRIeIbQa7REQ+Zq4LS2PDHBincIt t9opk7AqYfaTf/8i+rrcSXTJFv50lQnQ4vawsMJkd5fgZgLKYu/UQm6XJEL9H0ZcRoE9 77MGF19V5BuYIgjI+Zq5h8SJxCa9Qgrn+/a/q7I/6jgpscjqltrJOxt0Qns1/KzWy5ph UfAgamCQ0JDebDyYkD5e9/iW+QpJ+TKb5gQAUh35eflXGOGwkFn0Gq8EWJ7hFkiR5hyN U8kA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PwFKZnau; spf=pass (google.com: domain of chime.evan.dri.devel@gmail.com designates 2607:f8b0:4864:20::e44 as permitted sender) smtp.mailfrom=chime.evan.dri.devel@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com. [2607:f8b0:4864:20::e44]) by gmr-mx.google.com with ESMTPS id a17si970815iok.0.2019.11.04.10.55.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Nov 2019 10:55:00 -0800 (PST) Received-SPF: pass (google.com: domain of chime.evan.dri.devel@gmail.com designates 2607:f8b0:4864:20::e44 as permitted sender) client-ip=2607:f8b0:4864:20::e44; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PwFKZnau; spf=pass (google.com: domain of chime.evan.dri.devel@gmail.com designates 2607:f8b0:4864:20::e44 as permitted sender) smtp.mailfrom=chime.evan.dri.devel@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-vs1-xe44.google.com with SMTP id y23so5187054vso.1 for ; Mon, 04 Nov 2019 10:55:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UGVnaFipR/GrB/6hfrr17vjy/wp7z4VWMiX515y8JUQ=; b=PwFKZnauf86z6DcvLO2QyvOOInIlbr5bAtcVQgpOKJEhFQLvTmaJnNKUL2eiHjgpgU VA59Plu46SRQyFK4CRbX5dyfYDYNPcZ9qeIZC0GaHzOiN9EuZ0ImhNcZVsN18Db32oK2 49cwWtQX7No5SdMwMiUeZDZ6ETcngc6H8mNuyVws3/IqIB06buCAqlayChDPN1WY5G4Z 4U3NLv9AW06mdr2gxGayTiDjeup4IQvskyW7LFB4ekGgBsD5gi/PTliFFrJNQLwnYXMe 7x9VgMGHBGQW6CM6XfJHEd5HcEvFSvAbT2fnPYp0yvTct5EKLWSSW4VvoeTbjTDElo5H 7zfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UGVnaFipR/GrB/6hfrr17vjy/wp7z4VWMiX515y8JUQ=; b=GdY5uhZVnng2hnQEwC1Rfn4X2ZJbSW8qasWyNNbmnPjsiX6OPNLpMfkJLx4fB6yjbQ pgMxoeJOzqVaY1HBPHBPxyV1MGHdPg2E8jPiv2PFO0oxizqGokct72ponZ6dSgOMuehq QG3wmeoMvys/cLCFYgqsvkYrdB29OOIQJliaMUg4PCxVTLIZRllY9dlf1vZYuYPRiktr SHUG6f3aCFR4ojMqlc7bJsOHOkVUXKI/eeIiEt2B7vb1trMnw3oD+pkjhUI9t9Onla23 /dAgpKrRio+a63HTSFiDHrsr4rFWPDpVuqhwzw/bwKXkgWOAZq1Y/oxAcr1UStjiRD7n zn8A== X-Gm-Message-State: APjAAAW1zGw1dX+a8MXgfIXEQp3fKxTa+LndxSMyeMX6BaFQSSmFuKVX DsMWiJsv7zxl/qLl0lC9iFy9VN9FgyJI8kq9k+w= X-Received: by 2002:a67:6bc1:: with SMTP id g184mr12928098vsc.161.1572893700076; Mon, 04 Nov 2019 10:55:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: evan chime Date: Mon, 4 Nov 2019 18:54:08 +0000 Message-ID: Subject: Re: [Outreachy kernel] [PATCH v2 0/3] Add comment to memory barrier To: Julia Lawall Cc: gregkh@linuxfoundation.org, laurent.pinchart@ideasonboard.com, mchehab@kernel.org, outreachy-kernel@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000433905059689da22" --000000000000433905059689da22 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 4 Nov 2019 at 13:26, evan chime wrote: > > > On Sun, 3 Nov 2019 at 16:27, evan chime > wrote: > >> >> On Sun, 3 Nov 2019 at 16:18, Julia Lawall wrote: >> >>> >>> >>> On Sun, 3 Nov 2019, Evan Chime wrote: >>> >>> > Include outreachy mailing list in "cc" list. No change >>> > >>> > Evan Chime (3): >>> > Staging: media: omap4iss: Add comment to memory barrier >>> > Staging: media: omap4iss: Add comment to memory barrier >>> > Staging: media: omap4iss: Add comment to memory barrier >>> >>> Each patch should have a different subject. If you end up with patches >>> with the same subject, you should make the subjects more specific or >>> merge >>> them. >>> >>> In this case, though, I think that this is an issue that only someone >>> with >>> a deep knowledge of the code could really address. The question is not >>> what a memory barrier does, but why one is needed at a particular place >>> in >>> the code. >>> >>> julia >> >> >> Thanks for the feedback Julia >> >> Kind Regards >> Evan >> > > Please I have studied the function. From what I understand, the function > checks if ISS submodule needs to wait for next interrupt. If yes, makes t= he > caller to sleep while waiting for such event. > > > The atomic_set(stopping, 1) indicates whether the submodule needs to wait= , > where stopping is the flag, and atomic_set(stopping, 0) indicates no need > to wait > > > According to the comment before the first atomic_set() call and the > smp_wmb() call that follows which says: > > /* Atomic set() doesn=E2=80=99t include memory barrier on ARM platform fo= r SMP > scenario. We=E2=80=99ll call it here to avoid race conditions */, the smp= _wmb() > call is I think, to avoid reordering of the atomic_set() operation > > > So can I use one of the following, as the comment > > > A) prevent reordering of atomic_set() > > > B) sync module with it=E2=80=99s idle state(from the comment that introdu= ced the > function) > > > C) ensures *stopping is persistent > > > D) none of the above :) > Please forgive me for the first email, just noticed I didn=E2=80=99t say wh= o it was coming from at the end. I have studied the function. From what I understand, the function checks if ISS submodule needs to wait for next interrupt. If yes, makes the caller to sleep while waiting for such event. The atomic_set(stopping, 1) indicates whether the submodule needs to wait, where stopping is the flag, and atomic_set(stopping, 0) indicates no need to wait According to the comment before the first atomic_set() call and the smp_wmb() call that follows which says: /* Atomic set() doesn=E2=80=99t include memory barrier on ARM platform for = SMP scenario. We=E2=80=99ll call it here to avoid race conditions */, the smp_w= mb() call is I think, to avoid reordering of the atomic_set() operation So can I use one of the following, as the comment A) prevent reordering of atomic_set() B) sync module with it=E2=80=99s idle state(from the comment that introduce= d the function) C) ensures *stopping is persistent D) none of the above :) Kind regards Evan > > >> >> >>> >>> > >>> > drivers/staging/media/omap4iss/iss.c | 6 +++--- >>> > 1 file changed, 3 insertions(+), 3 deletions(-) >>> > >>> > -- >>> > 2.17.1 >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups "outreachy-kernel" group. >>> > To unsubscribe from this group and stop receiving emails from it, sen= d >>> an email to outreachy-kernel+unsubscribe@googlegroups.com. >>> > To view this discussion on the web visit >>> https://groups.google.com/d/msgid/outreachy-kernel/cover.1572797322.git= .chime.evan.dri.devel%40gmail.com >>> . >>> > >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "outreachy-kernel" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to outreachy-kernel+unsubscribe@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.1911= 031716390.2557%40hadrien >>> . >>> >> --000000000000433905059689da22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, 4 Nov 2019 at 13:26, evan chime <chime.evan.dri.devel@gmail.com> w= rote:


On Sun, 3 Nov 2= 019 at 16:27, evan chime <chime.evan.dri.devel@gmail.com> wrote:

On Sun, 3 Nov 2019 at 16:18, Julia Lawall &= lt;julia.lawall@l= ip6.fr> wrote:


On Sun, 3 Nov 2019, Evan Chime wrote:

> Include outreachy mailing list in "cc" list. No change
>
> Evan Chime (3):
>=C2=A0 =C2=A0Staging: media: omap4iss: Add comment to memory barrier >=C2=A0 =C2=A0Staging: media: omap4iss: Add comment to memory barrier >=C2=A0 =C2=A0Staging: media: omap4iss: Add comment to memory barrier
Each patch should have a different subject.=C2=A0 If you end up with patche= s
with the same subject, you should make the subjects more specific or merge<= br> them.

In this case, though, I think that this is an issue that only someone with<= br> a deep knowledge of the code could really address.=C2=A0 The question is no= t
what a memory barrier does, but why one is needed at a particular place in<= br> the code.

julia

Thanks for = the feedback Julia

Kind= =C2=A0Regards
Evan=C2=A0

=

Please I have studied= the function. From what I understand, the function checks if ISS submodule= needs to wait for next interrupt. If yes, makes the caller to sleep while = waiting for such event.=C2=A0


The atomic_set(stopping, 1) indicates whether the subm= odule needs to wait, where stopping is the flag, and atomic_set(stopping, 0= ) indicates no need to wait=C2=A0


According to the comment before the first atomic_s= et() call and the smp_wmb() call that follows which says:

/* Atomic set() doesn=E2=80=99t i= nclude memory barrier on ARM platform for SMP scenario. We=E2=80=99ll call = it here to avoid race conditions */, the smp_wmb() call is I think, to avoi= d reordering of the atomic_set() operation


So can I use one of the following, as the= comment=C2=A0


A) prevent reordering of atomic_set()


B) sync module with it=E2=80=99s idle st= ate(from the comment that introduced the function)


C) ensures *stopping is persiste= nt=C2=A0


= D) none of the above :)


=

Please forgive = me for the first email, just noticed I didn=E2=80=99t say who it was coming= from at the end.


I have studied= the function. From what I understand, the function checks if ISS submodule= needs to wait for next interrupt. If yes, makes the caller to sleep while = waiting for such event.=C2=A0


Th= e atomic_set(stopping, 1) indicates whether the submodule needs to wait, wh= ere stopping is the flag, and atomic_set(stopping, 0) indicates no need to = wait=C2=A0


According to the comm= ent before the first atomic_set() call and the smp_wmb() call that follows = which says:

/* Atomic set() doesn=E2=80=99t include memory barrie= r on ARM platform for SMP scenario. We=E2=80=99ll call it here to avoid rac= e conditions */, the smp_wmb() call is I think, to avoid reordering of the = atomic_set() operation


So can I= use one of the following, as the comment=C2=A0


A) prevent reordering of atomic_set()


B) sync module with it=E2=80=99s idle state(from the = comment that introduced the function)

<= br>

C) ensures *stopping is persistent=C2=A0


D) none of the above :)

=

Kind regards=C2=A0

Evan=C2=A0



=




>
>=C2=A0 drivers/staging/media/omap4iss/iss.c | 6 +++---
>=C2=A0 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Gro= ups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email to outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com= /d/msgid/outreachy-kernel/cover.1572797322.git.chime.evan.dri.devel%40gmail= .com.
>

--
You received this message because you are subscribed to the Google Groups &= quot;outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to outreachy-kernel+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/outre= achy-kernel/alpine.DEB.2.21.1911031716390.2557%40hadrien.
--000000000000433905059689da22--