From: Caz Yokoyama <Caz.Yokoyama@intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH 1/1] lib: consolidate duplicated define of vfs_file_max(void)
Date: Wed, 17 Apr 2019 07:49:35 -0700 [thread overview]
Message-ID: <d725813c4f54ba83b26393f8af47fef2b64bec7a.camel@intel.com> (raw)
In-Reply-To: <20190417081258.GN22949@platvala-desk.ger.corp.intel.com>
Petri,
To where Documentation goes to? To commit message? To one of the files
in docs directory? man directory?
It may be obvious for you, but please clarify for clear understanding
on both of us.
Thank you.
-caz
On Wed, 2019-04-17 at 11:12 +0300, Petri Latvala wrote:
> On Tue, Apr 16, 2019 at 08:57:35AM -0700, Caz Yokoyama wrote:
> > Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
> > Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > ---
> > lib/igt_aux.c | 14 ++++++++++++++
> > lib/igt_aux.h | 2 ++
> > lib/intel_os.c | 14 --------------
> > tests/i915/gem_exec_reuse.c | 14 +-------------
> > 4 files changed, 17 insertions(+), 27 deletions(-)
> >
> > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > index 05528352..ac33875e 100644
> > --- a/lib/igt_aux.c
> > +++ b/lib/igt_aux.c
> > @@ -1615,3 +1615,17 @@ bool igt_allow_unlimited_files(void)
> > rlim.rlim_max = nofile_rlim;
> > return setrlimit(RLIMIT_NOFILE, &rlim) == 0;
> > }
> > +
> > +uint64_t vfs_file_max(void)
> > +{
> > + static long long unsigned max;
> > + if (max == 0) {
> > + FILE *file = fopen("/proc/sys/fs/file-max", "r");
> > + max = 80000;
> > + if (file) {
> > + igt_assert(fscanf(file, "%llu", &max) == 1);
> > + fclose(file);
> > + }
> > + }
> > + return max;
> > +}
>
>
> Documentation for functions added to lib, please.
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-17 14:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 15:57 [igt-dev] [PATCH 1/1] lib: consolidate duplicated define of vfs_file_max(void) Caz Yokoyama
2019-04-16 17:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [1/1] " Patchwork
2019-04-17 8:12 ` [igt-dev] [PATCH 1/1] " Petri Latvala
2019-04-17 14:49 ` Caz Yokoyama [this message]
2019-04-24 10:19 ` Petri Latvala
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=d725813c4f54ba83b26393f8af47fef2b64bec7a.camel@intel.com \
--to=caz.yokoyama@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/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