From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Subject: [RFC 0/3] mac80211 powersave improvements
Date: Wed, 15 Apr 2009 19:10:46 +0200 [thread overview]
Message-ID: <20090415171046.336006351@sipsolutions.net> (raw)
Hi,
This series contains the following:
1) improve powersave to only allow it when a single
managed interface is active
2) disable PS when the maximum networking latency
applications are are willing to put up with is
smaller than the beacon interval -- in that case
we cannot allow the AP to buffer frames
3) enable powersave by default
The last part might be controversial?
Should we have a default setting for the dynamic PS
timeout?
Oh also -- below is a small program to play with the
pm_qos framework, feel free to rip it for anything.
johannes
/*
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*
* Compile simply with:
* cc -o netlatency netlatency.c
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int32_t v;
int fd;
if (argc != 2) {
fprintf(stderr, "Usage: %s <latency [us]>\n", argv[0]);
fprintf(stderr, "\n");
fprintf(stderr, " latency: the maximum tolerable network latency you\n");
fprintf(stderr, " are willing to put up with [in microseconds]\n");
fprintf(stderr, "\n");
fprintf(stderr, "This program will block until you hit Ctrl-C, at which point\n");
fprintf(stderr, "the file descriptor is closed and the latency requirement is\n");
fprintf(stderr, "unregistered again.\n");
return 2;
}
v = atoi(argv[1]);
printf("setting latency to %d.%.6d seconds\n", v/1000000, v % 1000000);
fd = open("/dev/network_latency", O_WRONLY);
if (fd < 0) {
perror("open /dev/network_latency");
return 1;
}
if (write(fd, &v, sizeof(v)) != sizeof(v)) {
perror("write to /dev/network_latency");
return 1;
}
while (1) sleep(10);
return 0;
}
next reply other threads:[~2009-04-15 17:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 17:10 Johannes Berg [this message]
2009-04-15 17:10 ` [RFC 1/3] mac80211: improve powersave implementation Johannes Berg
2009-04-15 19:38 ` [RFC 1/3 v2] " Johannes Berg
2009-04-16 10:55 ` Kalle Valo
2009-04-15 17:10 ` [RFC 2/3] mac80211: disable powersave if pm_qos asks for low latency Johannes Berg
2009-04-15 19:38 ` [RFC 2/3 v2] " Johannes Berg
2009-04-16 10:58 ` Kalle Valo
2009-04-15 17:10 ` [RFC 3/3] mac80211: enable PS by default Johannes Berg
2009-04-16 10:39 ` [RFC 3/3 v2] " Johannes Berg
2009-04-16 11:01 ` [RFC 0/3] mac80211 powersave improvements Kalle Valo
2009-04-16 11:06 ` Johannes Berg
2009-04-16 11:11 ` Kalle Valo
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=20090415171046.336006351@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@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 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.