All of lore.kernel.org
 help / color / mirror / Atom feed
From: Levente Kurusa <levex@linux.com>
To: Kay Sievers <kay@vrfy.org>, Tejun Heo <tj@kernel.org>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] ata_piix: minor typo fixes and threading fix
Date: Fri, 27 Sep 2013 15:29:56 +0200	[thread overview]
Message-ID: <52458854.9090000@linux.com> (raw)
In-Reply-To: <CAPXgP13UZYEgdm6er8HrsoCiajwAXEzg_jn4Q7OgY2zDMGv-9g@mail.gmail.com>

2013-09-26 19:57 keltezéssel, Kay Sievers írta:
> On Thu, Sep 26, 2013 at 4:09 PM, Tejun Heo <tj@kernel.org> wrote:
>> (cc'ing Kay)
>>
>> On Wed, Sep 25, 2013 at 04:40:30PM +0200, Levente Kurusa wrote:
>>> I am getting the following output:
>>> [    2.236379] ata_piix 0000:00:1f.2: MAP [
>>> [    2.236492]  P0 P2 -- -- ]
>>> Instead of the expected:
>>> [    2.236379] ata_piix 0000:00:1f.2: MAP [ P0 P2 -- -- ]
>>>
>>> This might be a minor problem, but I think it is better the second way.
>>> Of course, now that I better understand the code, I see that my fix to this,
>>> is not the best. I will make a new patch, if you think this should be fixed.
>>
>> Hmmm... so, you're saying pr_cont() is misbehaving after dev_info()?
>> If so, we don't want to paper over that from a low level driver like
>> ata_piix.  Let's find out what's going on with pr_cont().
>>
>> Kay, Levente is seeing the above output from
>> drivers/ata/ata_piix.c::piix_init_sata_map().  Any ideas?
>
> Yes, the dev_printk() versions are "atomic lines", cannot be
> concatenated with other invocations of printk() like the normal
> printks can. The reason is that the dev_* versions carry structured
> data to userspace, and there, the logs are indexed by device.
>
> We don't want to allow the convenient but very racy and
> non-thread-safe concatenation lines for dev_* versions, they might
> pick up unrelated text fragments from other threads into the logged
> text line; userspace (non-human tools) can not really cope with that.
>
> So, the printk should not use the dev_* version, or print all in one
> call, if a single line is expected.
>
> Kay
>

Thank you Kay for clarifying this! I think I will go with
creating a buffer, and printing this all in one line.

Tejun, during this weekend I will create a patch that
hopefully fixes this. However, if you think that setting
up a temporary buffer is inappropriate, please comment.


Thank you,
Levente Kurusa

      parent reply	other threads:[~2013-09-27 13:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22 13:53 [PATCH] ata_piix: minor typo fixes and threading fix Levente Kurusa
2013-09-22 14:44 ` Sergei Shtylyov
2013-09-22 15:05   ` Levente Kurusa
2013-09-22 15:10   ` Sergei Shtylyov
2013-09-22 15:39 ` Tejun Heo
2013-09-22 15:46   ` Levente Kurusa
2013-09-22 16:05     ` Tejun Heo
2013-09-25 14:40       ` Levente Kurusa
2013-09-26 14:09         ` Tejun Heo
2013-09-26 17:14           ` Levente Kurusa
2013-09-26 17:57           ` Kay Sievers
2013-09-27 13:28             ` Tejun Heo
2013-09-27 13:29             ` Levente Kurusa [this message]

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=52458854.9090000@linux.com \
    --to=levex@linux.com \
    --cc=kay@vrfy.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.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.