mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Torsten Foertsch <torsten.foertsch@gmx.net>
To: linux-kernel@vger.kernel.org
Subject: Problem with smaps in 2.6.13-rc4-mm1
Date: Sat, 6 Aug 2005 09:15:22 +0200	[thread overview]
Message-ID: <200508060915.28277.torsten.foertsch@gmx.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 900 bytes --]

Hi,

when trying out smaps I have encountered the following problem:

> cat /proc/$P/smaps | diff - /proc/$P/smaps
239,241c239,241
< bfbaf000-bfbc4000 rw-p bfbaf000 00:00 0          [stack]
< Size:                84 kB
< Rss:                 24 kB
---
> b7fc4000-b7fc6000 rwxp 00015000 08:02 12558      /lib/ld-2.3.4.so
> Size:                 8 kB
> Rss:                  8 kB
245c245
< Private_Dirty:       24 kB
---
> Private_Dirty:        8 kB

Further investigation shows that diff reads /proc/$P/smaps in 1 kB blocks as 
do cat if stdout is a terminal. But if stdout is a pipe cat reads the file in 
128 kB blocks.

The culprit is probably fs/proc/task_mmu.c:m_start(). I think it doesn't 
properly convert the current file position.

Reading in blocks up to 3700 bytes yields the correct result. Higher block 
sizes are wrong.

Is that a known problem?

Torsten

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2005-08-06  7:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-06  7:15 Torsten Foertsch [this message]
2005-08-06 18:29 ` [PATCH] " Torsten Foertsch

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=200508060915.28277.torsten.foertsch@gmx.net \
    --to=torsten.foertsch@gmx.net \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®